-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
21 lines (21 loc) · 1.71 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"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",
"_id": "peakle@0.0.1",
"description": "Peakle is a tiny abstraction around lists that makes them more walkable.",
"dist": {
"shasum": "13b804a0756b21cef1b93cbcd8a94a29b8ead095"
},
"_from": "peakle@*",
"_resolved": "https://registry.npmjs.org/peakle/-/peakle-0.0.1.tgz"
}