Skip to content

codewell/reorder-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@codewell/reorder-array

Reorder an array

Installation

npm install @codewell/reorder-array

Basic usage

import reorderArray from '@codewell/reorder-array';

reorderArray(['a', 'b', 'c'], 0, 2); // => ['b', 'c', 'a']
reorderArray(['a', 'b', 'c'], 2, 0); // => ['c', 'a', 'b']

About

Set which element should be at the end of an array

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published