-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
38 lines (38 loc) · 2.19 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"name": "stable",
"version": "0.1.3",
"keywords": [
"stable",
"array",
"sort"
],
"description": "A stable array sort for JavaScript",
"repository": {
"type": "git",
"url": "https://github.com/Two-Screen/stable.git"
},
"main": "stable.js",
"devDependencies": {
"tap": "0.2",
"uglify-js": "1"
},
"scripts": {
"test": "tap test.js",
"minify": "uglifyjs -o stable.min.js stable.js"
},
"author": {
"name": "Stéphan Kochen",
"email": "stephan@angrybytes.com"
},
"contributors": [
{
"name": "Domenic Denicola",
"email": "domenic@domenicdenicola.com"
}
],
"license": "MIT",
"readme": "## Stable [![Build Status](https://secure.travis-ci.org/Two-Screen/stable.png)](http://travis-ci.org/Two-Screen/stable)\n\nA stable array sort, because `Array#sort()` is not guaranteed stable.\n\nMIT licensed.\n\n### From the browser\n\nInclude [`stable.js`] or the minified version [`stable.min.js`]\nin your page, then call `stable()`.\n\n [`stable.js`]: https://raw.github.com/Two-Screen/stable/master/stable.js\n [`stable.min.js`]: https://raw.github.com/Two-Screen/stable/master/stable.min.js\n\n### From Node.js\n\nInstall using NPM:\n\n npm install stable\n\nRequire in your code:\n\n var stable = require(\"stable\");\n\n#### Usage\n\nThe default sort is, as with `Array#sort`, lexicographical.\nUnlike `Array#sort`, sorting is **NOT** performed in-place.\n\n stable([\"foo\", \"bar\", \"baz\"]); // => [\"bar\", \"baz\", \"foo\"]\n stable([10, 1, 5]); // => [1, 10, 5]\n\nA comparator function can be specified:\n\n // Regular sort() compatible comparator, that returns a number.\n // This demonstrates the default behavior.\n function lexCmp(a, b) {\n return String(a).localeCompare(b);\n }\n stable([\"foo\", \"bar\", \"baz\"], lexCmp); // => [\"bar\", \"baz\", \"foo\"]\n\n // Boolean comparator. Sorts `b` before `a` if true.\n // This demonstrates a simple way to sort numerically.\n function greaterThan(a, b) {\n return a > b;\n }\n stable([10, 1, 5], greaterThan); // -> [1, 5, 10]\n",
"readmeFilename": "README.md",
"_id": "stable@0.1.3",
"_from": "stable@~0.1.2"
}