UNPKG

motion

Version:

motion - moving development forward

72 lines (71 loc) 3.01 kB
{ "_args": [ [ "uniq@https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "uniq@>=1.0.1 <2.0.0", "_id": "uniq@1.0.1", "_inCache": true, "_location": "/uniq", "_phantomChildren": {}, "_requested": { "name": "uniq", "raw": "uniq@https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", "rawSpec": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", "scope": null, "spec": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", "type": "remote" }, "_requiredBy": [ "/postcss-selector-parser" ], "_resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", "_shasum": "b31c5ae8254844a3a8281541ce2b04b865a734ff", "_shrinkwrap": null, "_spec": "uniq@https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", "_where": "/Users/nw/flint/packages/flint", "author": { "name": "Mikola Lysenko" }, "bugs": { "url": "https://github.com/mikolalysenko/uniq/issues" }, "dependencies": {}, "description": "Removes duplicates from a sorted array in place", "devDependencies": { "tape": "^2.12.3" }, "directories": { "test": "test" }, "gitHead": "e9828cfcb97e25a351f95b39fdf3c31876ff3985", "homepage": "https://github.com/mikolalysenko/uniq#readme", "keywords": [ "array", "copy", "duplicate", "in", "no", "place", "remove", "sort", "uniq", "unique" ], "license": "MIT", "main": "uniq.js", "name": "uniq", "optionalDependencies": {}, "readme": "uniq\n====\nRemoves all duplicates from an array in place.\n\nUsage\n=====\nFirst install using npm:\n\n npm install uniq\n \nThen use it as follows:\n\n```javascript\n\nvar arr = [1, 1, 2, 2, 3, 5]\n\nrequire(\"uniq\")(arr)\nconsole.log(arr)\n\n//Prints:\n//\n// 1,2,3,5\n//\n```\n\n## `require(\"uniq\")(array[, compare, sorted])`\nRemoves all duplicates from a sorted array in place.\n\n* `array` is the array to remove items from\n* `compare` is an optional comparison function that returns 0 when two items are equal, and something non-zero when they are different. If unspecified, then the default equals will be used.\n* `sorted` if true, then assume array is already sorted\n\n**Returns:** A reference to `array`\n\n**Time Complexity:** `O(array.length * log(arra.length))` or `O(array.length)` if `sorted`\n\n\n## Why use this instead of underscore.uniq[ue]?\nA few reasons:\n\n* This library updates the array in place without making an extra copy (and so it is faster for large arrays)\n* It also accepts a custom comparison function so you can remove duplicates from arrays containing object\n* It is more modular in the sense that it doesn't come with a bazillion other utility grab bag functions.\n\n# Credits\n(c) 2013 Mikola Lysenko. MIT License\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/mikolalysenko/uniq.git" }, "scripts": { "test": "tape test/*.js" }, "version": "1.0.1" }