Package Exports
- @ricardomatias/ring
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ricardomatias/ring) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ring 
Your average array made cyclical by using Proxy
import ring from '@ricardomatias/ring';
const AM7 = [ 'A', 'C', 'E', 'G' ];
const am7 = ring(AM7);
const first = am7[0]; // 'A'
const firstAgain = am7[4]; // 'A'
const firstYetAgain = am7[-4]; // 'A'
AM7 === am7 // => falseInstall
Use npm to install.
npm install @ricardomatias/ring --saveUsage
ring([Array])
Returns a new proxied array. Provides access to all the native Array methods and properties.
License
MIT, see LICENSE.md for details.