UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

82 lines (81 loc) 3.27 kB
{ "_args": [ [ { "raw": "cyclist@~0.2.2", "scope": null, "escapedName": "cyclist", "name": "cyclist", "rawSpec": "~0.2.2", "spec": ">=0.2.2 <0.3.0", "type": "range" }, "/home/zkochan/src/pnpm/packages/pnpm/node_modules/parallel-transform" ] ], "_from": "cyclist@>=0.2.2 <0.3.0", "_id": "cyclist@0.2.2", "_inCache": true, "_location": "/cyclist", "_npmUser": { "name": "mafintosh", "email": "mathiasbuus@gmail.com" }, "_npmVersion": "1.3.5", "_phantomChildren": {}, "_requested": { "raw": "cyclist@~0.2.2", "scope": null, "escapedName": "cyclist", "name": "cyclist", "rawSpec": "~0.2.2", "spec": ">=0.2.2 <0.3.0", "type": "range" }, "_requiredBy": [ "/parallel-transform" ], "_resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", "_shasum": "1b33792e11e914a2fd6d6ed6447464444e5fa640", "_shrinkwrap": null, "_spec": "cyclist@~0.2.2", "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/parallel-transform", "author": { "name": "Mathias Buus Madsen", "email": "mathiasbuus@gmail.com" }, "bugs": { "url": "https://github.com/mafintosh/cyclist/issues" }, "dependencies": {}, "description": "Cyclist is an efficient cyclic list implemention.", "devDependencies": {}, "directories": {}, "dist": { "shasum": "1b33792e11e914a2fd6d6ed6447464444e5fa640", "tarball": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz" }, "homepage": "https://github.com/mafintosh/cyclist#readme", "keywords": [ "circular", "buffer", "ring", "cyclic", "data" ], "maintainers": [ { "name": "mafintosh", "email": "mathiasbuus@gmail.com" } ], "name": "cyclist", "optionalDependencies": {}, "readme": "# Cyclist\n\nCyclist is an efficient [cyclic list](http://en.wikipedia.org/wiki/Circular_buffer) implemention for Javascript.\nIt is available through npm\n\n\tnpm install cyclist\n\n## What?\n\nCyclist allows you to create a list of fixed size that is cyclic.\nIn a cyclist list the element following the last one is the first one.\nThis property can be really useful when for example trying to order data\npackets that can arrive out of order over a network stream.\n\n## Usage\n\n``` js\nvar cyclist = require('cyclist');\nvar list = cyclist(4); // if size (4) is not a power of 2 it will be the follwing power of 2\n // this buffer can now hold 4 elements in total\n\nlist.put(42, 'hello 42'); // store something and index 42\nlist.put(43, 'hello 43'); // store something and index 43\n\nconsole.log(list.get(42)); // prints hello 42\nconsole.log(list.get(46)); // prints hello 42 again since 46 - 42 == list.size\n```\n\n## API\n\n* `cyclist(size)` creates a new buffer\n* `cyclist#get(index)` get an object stored in the buffer\n* `cyclist#put(index,value)` insert an object into the buffer\n* `cyclist#del(index)` delete an object from an index\n* `cyclist#size` property containing current size of buffer\n\n## License\n\nMIT\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/mafintosh/cyclist.git" }, "version": "0.2.2" }