UNPKG

motion

Version:

motion - moving development forward

65 lines (64 loc) 2.95 kB
{ "_args": [ [ "uniqs@https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "uniqs@>=2.0.0 <3.0.0", "_id": "uniqs@2.0.0", "_inCache": true, "_location": "/uniqs", "_phantomChildren": {}, "_requested": { "name": "uniqs", "raw": "uniqs@https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", "rawSpec": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", "scope": null, "spec": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", "type": "remote" }, "_requiredBy": [ "/postcss-discard-unused", "/postcss-minify-font-values", "/postcss-minify-params", "/postcss-unique-selectors", "/postcss-zindex" ], "_resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", "_shasum": "ffede4b36b25290696e6e165d4a59edb998e6b02", "_shrinkwrap": null, "_spec": "uniqs@https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", "_where": "/Users/nw/flint/packages/flint", "author": { "email": "fgnass@gmail.com", "name": "Felix Gnass" }, "bugs": { "url": "https://github.com/fgnass/uniqs/issues" }, "dependencies": {}, "description": "Tiny utility to create unions and de-duplicated lists", "devDependencies": {}, "homepage": "https://github.com/fgnass/uniqs#readme", "keywords": [ "dedupe", "union", "uniq", "unique" ], "license": "MIT", "main": "index.js", "name": "uniqs", "optionalDependencies": {}, "readme": "[![Build Status](https://travis-ci.org/fgnass/uniqs.svg?branch=master)](https://travis-ci.org/fgnass/uniqs)\n\n### Tiny utility to create unions and de-duplicated lists.\n\nExample:\n\n```js\nvar uniqs = require('uniqs');\n\nvar foo = { foo: 23 };\nvar list = [3, 2, 2, 1, foo, foo];\n\nuniqs(list);\n// => [3, 2, 1, { foo: 23 }]\n```\n\nYou can pass multiple lists to create a union:\n\n```js\nuniqs([2, 1, 1], [2, 3, 3, 4], [4, 3, 2]);\n// => [2, 1, 3, 4]\n```\n\nPassing individual items works too:\n```js\nuniqs(3, 2, 2, [1, 1, 2]);\n// => [3, 2, 1]\n```\n\n### Summary\n\n* Uniqueness is defined based on strict object equality.\n* The lists do not need to be sorted.\n* The resulting array contains the items in the order of their first appearance.\n\n### About\n\nThis package has been written to accompany utilities like\n[flatten](https://npmjs.org/package/flatten) as alternative to full-blown\nlibraries like underscore or lodash.\n\nThe implementation is optimized for simplicity rather than performance and\nlooks like this:\n\n```js\nmodule.exports = function uniqs() {\n var list = Array.prototype.concat.apply([], arguments);\n return list.filter(function(item, i) {\n return i == list.indexOf(item);\n });\n};\n```\n\n### License\nMIT\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/fgnass/uniqs.git" }, "scripts": { "test": "node test" }, "version": "2.0.0" }