| { |
| "name": "peakle", |
| "version": "0.0.1", |
| "main": "./peakle.js", |
| "scripts": { |
| "test": "./node_modules/grunt/bin/grunt test", |
| "lint": "./node_modules/grunt/bin/grunt lint" |
| }, |
| "devDependencies": { |
| "grunt": "*" |
| }, |
| "readme": "Peakle is a tiny abstraction around lists that makes them more walkable.\n\nPeakle's constructor takes only one parameter, a list of values.\n\n\tvar peakled = new Peakle([ 1, 2, 3 ]);\n\nBy default, the current position is always at the first element. If the\ninitial list is empty, then the current position is 'null'.\n\nProperties:\n\n\t* length: returns a number of elements in the underlying list.\n\t* current: returns a value of the current element.\n\nMethods:\n\n\t* next(): Moves to the next element and returns its value.\n\t* prev(): Moves to the previous element and returns its value.\n\t* peak(adv): Returns next element's value without moving its pointer.\n\t This method accepts an optional numeric parameter. Use it if you\n\t want to peak further.\n\t* move(index): Moves to the specified element.\n\nAll methods return 'null' if they can't return a value.\n\nExample:\n\n\tvar peakled = new Peakle([ 1, 2, 3 ]);\n\n\tpeakled.current; // 1\n\tpeakled.peak(); // 2\n\tpeakled.peak(2); // 3\n\n\tpeakled.next(); // 2\n\tpeakled.peak(); // 3\n\tpeakled.peak(2); // null\n\tpeakled.peak(-1); // 1\n\n\tpeakled.prev(); // 1\n\tpeakled.move(2); // 3\n", |
| "readmeFilename": "README", |
| "description": "Peakle is a tiny abstraction around lists that makes them more walkable.", |
| "_id": "peakle@0.0.1", |
| "_from": "peakle@0.0.x" |
| } |