Reorder an array
npm install @codewell/reorder-array
import reorderArray from '@codewell/reorder-array';
reorderArray(['a', 'b', 'c'], 0, 2); // => ['b', 'c', 'a']
reorderArray(['a', 'b', 'c'], 2, 0); // => ['c', 'a', 'b']| Name | Name | Last commit date | ||
|---|---|---|---|---|