Skip to content

NewOrbit/rotate-array-to

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rotate-array-to

Rotate an array to a given index

Installation

npm install rotate-array-to

Usage

import rotateArrayTo from "rotate-array-to";

const array = [ "apples", "oranges", "bananas", "peaches" ];

rotateArrayTo(array, 2); // [ "bananas", "peaches", "apples", "oranges" ]

License

Made with 💖 by NewOrbit in Oxfordshire, and licensed under the MIT Licence

About

Rotate an array to a given index

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published