{"name":"deps-sort","version":"1.3.2","description":"sort module-deps output for deterministic browserify bundles","main":"index.js","bin":{"deps-sort":"bin/cmd.js"},"dependencies":{"JSONStream":"~0.8.4","isarray":"0.0.1","minimist":"~0.2.0","shasum":"^1.0.0","through2":"~0.5.1"},"devDependencies":{"tape":"^2.13.4"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/deps-sort.git"},"homepage":"https://github.com/substack/deps-sort","keywords":["dependency","graph","browser","browserify","module-deps","browser-pack","sorted","determinism"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","gitHead":"cdbf4dedd8894be670d98d60743d0cf71f7e603a","bugs":{"url":"https://github.com/substack/deps-sort/issues"},"_id":"deps-sort@1.3.2","_shasum":"64d307246e2ec7d8715adebafaa6f34b64881041","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"dist":{"shasum":"64d307246e2ec7d8715adebafaa6f34b64881041","tarball":"http://registry-npm.ywwl.com/deps-sort/download/deps-sort-1.3.2.tgz","integrity":"sha512-wcbS+Pb6al3I5FUrh0MGqD/TyuvoLLlgLp4nFAP7NDd+vkLjjnzqbVrEXF0vvCHJKPaIjFR9g9J/bmmbc2mf0g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpl8xDDYl3LAixFDhXS8GKMXhQVJIZNIRcHeN3gdImKQIgQhHd5PVdEptMQxW2zozNJyminBH5r26O9H9rhKht5IA="}],"size":4014,"noattachment":false,"key":"/deps-sort/-/deps-sort-1.3.2.tgz"},"directories":{},"readme":"# deps-sort\n\nsort [module-deps](https://npmjs.org/package/module-deps) output for deterministic\nbrowserify bundles\n\n[![build status](https://secure.travis-ci.org/browserify/deps-sort.png)](http://travis-ci.org/browserify/deps-sort)\n\n# example\n\n## command-line\n\n```\n$ for((i=0;i<5;i++)); do module-deps main.js | deps-sort | browser-pack | md5sum; done\ne9e630de2c62953140357db0444c3c3a  -\ne9e630de2c62953140357db0444c3c3a  -\ne9e630de2c62953140357db0444c3c3a  -\ne9e630de2c62953140357db0444c3c3a  -\ne9e630de2c62953140357db0444c3c3a  -\n```\n\nor using `browserify --deps` on a [voxeljs](http://voxeljs.com/) project:\n\n```\n$ for((i=0;i<5;i++)); do browserify --deps browser.js | deps-sort | browser-pack | md5sum; done\nfb418c74b53ba2e4cef7d01808b848e6  -\nfb418c74b53ba2e4cef7d01808b848e6  -\nfb418c74b53ba2e4cef7d01808b848e6  -\nfb418c74b53ba2e4cef7d01808b848e6  -\nfb418c74b53ba2e4cef7d01808b848e6  -\n```\n\n## api\n\nTo use this module programmatically, write streaming object data and read\nstreaming object data:\n\n``` js\nvar sort = require('../')();\nvar JSONStream = require('JSONStream');\nvar parse = JSONStream.parse([ true ]);\nvar stringify = JSONStream.stringify();\n\nprocess.stdin.pipe(parse).pipe(sort).pipe(stringify).pipe(process.stdout);\n```\n\n# methods\n\n``` js\nvar depsSort = require('deps-sort');\n```\n\n## var stream = depsSort(opts)\n\nReturn a new through `stream` that should get written\n[module-deps](https://npmjs.org/package/module-deps) objects and will output\nsorted objects.\n\n`opts` can be:\n\n* `opts.index` - when true, for each module-deps row, insert `row.index` with\nthe numeric index and `row.indexDeps` like `row.deps` but mapping require\nstrings to row indices\n\n* `opts.expose` - array of names or object mapping names to `true` not to mangle\nwith integer indexes when `opts.index` is turned on. If `opts.expose` maps names\nto strings, those strings will be used to resolve the indexed references.\n\n* `opts.dedupe` - set `row.dedupe` for files that match existing contents. Sets\n`row.dedupeIndex` when `opts.index` is enabled. When `row.dedupe` is set,\n`row.sameDeps` will be set to a boolean of whether the dependencies at the\ndedupe target match (true) or just the source content (false).\n\n# input objects\n\nInput objects are file objects in the [module-deps][] shape. They must at least\nhave these properties:\n\n* `row.id` - a unique identifier for the file\n* `row.source` - the file contents\n* `row.deps` - dependencies for this file, mapping strings as used in\n  `require()` to row IDs.\n\n# output objects\n\nAll the input properties, and:\n\n* `row.index` - when `opts.index` is true, the sorted numeric index of the row\n* `row.indexDeps` - like `row.deps`, but mapping to `row.index` instead of\n  `row.id`\n* `row.dedupe` - when `opts.dedupe` is true, contains the row ID of a file with\n  identical contents\n* `row.dedupeIndex` - like `row.dedupe`, but contains the `row.index` instead\n  of `row.id`\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install deps-sort\n```\n\n# license\n\nMIT\n\n[module-deps]: https://github.com/browserify/module-deps#output-objects\n","publish_time":1406116008229,"_cnpm_publish_time":1406116008229,"dist-tags":{"latest":"2.0.1"}}