Package Exports
- circular-array
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 (circular-array) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Circular Array
Simple circular array data structure, for storing a finitely-sized list of values and automatically dropping values that no longer fit in the array. All operations are O(1).
Usage
npm install --save circular-array
var CircularArray = require('circular-array');
var gizmos = new CircularArray(3);
// gizmo.array() returns:
gizmos.push(gizmo1); // [gizmo1]
gizmos.push(gizmo2); // [gizmo1, gizmo2]
gizmos.push(gizmo3); // [gizmo1, gizmo2, gizmo3]
gizmos.push(gizmo4); // [gizmo4, gizmo2, gizmo3]