1.0.0 • Published 6 years ago

rotate-array-to v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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 :sparkling_heart: by NewOrbit in Oxfordshire, and licensed under the MIT Licence