{"id":18458769,"url":"https://github.com/browserify/deps-sort","last_synced_at":"2025-04-08T05:34:34.487Z","repository":{"id":9407584,"uuid":"11274642","full_name":"browserify/deps-sort","owner":"browserify","description":"sort module-deps output for deterministic browserify bundles","archived":false,"fork":false,"pushed_at":"2025-01-13T18:11:56.000Z","size":39,"stargazers_count":16,"open_issues_count":0,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-16T21:03:55.522Z","etag":null,"topics":["browserify","sort"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/browserify.png","metadata":{"files":{"readme":"readme.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-07-09T06:20:56.000Z","updated_at":"2025-01-13T18:11:59.000Z","dependencies_parsed_at":"2025-01-13T19:22:48.056Z","dependency_job_id":"cbde49fd-9b27-470a-8847-6676c34ccd7c","html_url":"https://github.com/browserify/deps-sort","commit_stats":{"total_commits":75,"total_committers":7,"mean_commits":"10.714285714285714","dds":"0.41333333333333333","last_synced_commit":"80b3ed883c1413fac8314b4766945bfbf3f7be8f"},"previous_names":["substack/deps-sort"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserify%2Fdeps-sort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserify%2Fdeps-sort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserify%2Fdeps-sort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserify%2Fdeps-sort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/browserify","download_url":"https://codeload.github.com/browserify/deps-sort/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247785919,"owners_count":20995641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browserify","sort"],"created_at":"2024-11-06T08:19:58.396Z","updated_at":"2025-04-08T05:34:29.467Z","avatar_url":"https://github.com/browserify.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"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\u003c5;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\u003c5;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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserify%2Fdeps-sort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrowserify%2Fdeps-sort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserify%2Fdeps-sort/lists"}