{"_id":"dag-map","_rev":"4527049","name":"dag-map","description":"A topologically ordered map of key/value pairs with a simple API for adding constraints.","dist-tags":{"latest":"2.0.2"},"maintainers":[{"name":"chadhietala","email":""},{"name":"krisselden","email":"kris.selden@gmail.com"},{"name":"rwjblue","email":"me@rwjblue.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"time":{"modified":"2026-04-09T13:23:33.000Z","created":"2015-01-23T19:06:53.025Z","2.0.2":"2017-01-08T10:27:32.660Z","2.0.1":"2016-09-02T17:16:16.803Z","2.0.0":"2016-09-02T02:52:49.707Z","1.0.2":"2015-04-21T16:55:41.160Z","1.0.1":"2015-04-21T16:28:59.107Z","1.0.0":"2015-01-23T19:06:53.025Z"},"users":{},"author":{"name":"Kris Selden"},"repository":{"type":"git","url":"git+https://github.com/krisselden/dag-map.git"},"versions":{"2.0.2":{"name":"dag-map","version":"2.0.2","description":"A topologically ordered map of key/value pairs with a simple API for adding constraints.","main":"dag-map.umd.js","module":"dag-map.js","jsnext:main":"dag-map.js","typings":"dag-map.d.ts","repository":{"type":"git","url":"git+https://github.com/krisselden/dag-map.git"},"keywords":["dag","map","dependencies"],"scripts":{"build":"npm run tsc && npm run rollup && npm run sorcery","tsc":"tsc","docs":"typedoc --out docs --tsconfig tsconfig.json --excludeNotExported --mode modules --theme minimal","rollup":"rollup -c","sorcery":"sorcery -i dag-map.umd.js","test":"node tests/run.js","prepublish":"npm run build"},"files":["dag-map.d.ts","dag-map.js","dag-map.js.map","dag-map.umd.js","dag-map.umd.js.map"],"author":{"name":"Kris Selden"},"license":"MIT","devDependencies":{"qunitjs":"^2.0.1","rollup":"^0.34.9","sorcery":"^0.10.0","tslint":"^3.14.0","typescript":"^2.0.0","typedoc":"^0.5.3"},"gitHead":"30d454111a42eecd2247598c88e0f51d23fb0f1e","bugs":{"url":"https://github.com/krisselden/dag-map/issues"},"homepage":"https://github.com/krisselden/dag-map#readme","_id":"dag-map@2.0.2","_shasum":"9714b472de82a1843de2fba9b6876938cab44c68","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"krisselden","email":"kris.selden@gmail.com"},"dist":{"shasum":"9714b472de82a1843de2fba9b6876938cab44c68","size":7402,"noattachment":false,"key":"/dag-map/-/dag-map-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-map/download/dag-map-2.0.2.tgz"},"maintainers":[{"name":"chadhietala","email":""},{"name":"krisselden","email":"kris.selden@gmail.com"},{"name":"rwjblue","email":"me@rwjblue.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dag-map-2.0.2.tgz_1483871252415_0.2655260416213423"},"directories":{},"publish_time":1483871252660,"_hasShrinkwrap":false,"_cnpm_publish_time":1483871252660,"_cnpmcore_publish_time":"2021-12-16T22:31:11.713Z"},"2.0.1":{"name":"dag-map","version":"2.0.1","description":"A map of key/value pairs that can be traversed in topological order","main":"dag-map.umd.js","module":"dag-map.js","jsnext:main":"dag-map.js","typings":"dag-map.d.ts","repository":{"type":"git","url":"git+https://github.com/krisselden/dag-map.git"},"keywords":["dag","map","dependencies"],"scripts":{"build":"npm run tsc && npm run rollup && npm run sorcery","tsc":"tsc","rollup":"rollup -c","sorcery":"sorcery -i dag-map.umd.js","test":"node tests/run.js","prepublish":"npm run build"},"files":["dag-map.d.ts","dag-map.js","dag-map.js.map","dag-map.umd.js","dag-map.umd.js.map"],"author":{"name":"Kris Selden"},"license":"MIT","devDependencies":{"rollup":"^0.34.9","sorcery":"^0.10.0","tslint":"^3.14.0","typescript":"^2.0.0","qunitjs":"^2.0.1"},"gitHead":"8a47081a80f95c51fa08be6c86876f37e9512ba9","bugs":{"url":"https://github.com/krisselden/dag-map/issues"},"homepage":"https://github.com/krisselden/dag-map#readme","_id":"dag-map@2.0.1","_shasum":"262d3dfa7cb57da0e4df698cc70d926d499e6ee9","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"krisselden","email":"kris.selden@gmail.com"},"dist":{"shasum":"262d3dfa7cb57da0e4df698cc70d926d499e6ee9","size":7274,"noattachment":false,"key":"/dag-map/-/dag-map-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-map/download/dag-map-2.0.1.tgz"},"maintainers":[{"name":"chadhietala","email":""},{"name":"krisselden","email":"kris.selden@gmail.com"},{"name":"rwjblue","email":"me@rwjblue.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dag-map-2.0.1.tgz_1472836576549_0.5773235196247697"},"directories":{},"publish_time":1472836576803,"_hasShrinkwrap":false,"_cnpm_publish_time":1472836576803,"_cnpmcore_publish_time":"2021-12-16T22:31:11.928Z"},"2.0.0":{"name":"dag-map","version":"2.0.0","description":"A map of key/value pairs that can be traversed in topological order","main":"dag-map.umd.js","module":"dag-map.js","jsnext:main":"dag-map.js","typings":"dag-map.d.ts","repository":{"type":"git","url":"git+https://github.com/krisselden/dag-map.git"},"keywords":["dag","map","dependencies"],"scripts":{"build":"npm run tsc && npm run rollup && npm run sorcery","tsc":"tsc","rollup":"rollup -c","sorcery":"sorcery -i dag-map.umd.js","test":"node tests/run.js","prepublish":"npm run build"},"files":["dag-map.d.ts","dag-map.js","dag-map.js.map","dag-map.umd.js","dag-map.umd.js.map"],"author":{"name":"Kris Selden"},"license":"MIT","devDependencies":{"rollup":"^0.34.9","sorcery":"^0.10.0","tslint":"^3.14.0","typescript":"^2.0.0"},"dependencies":{"qunitjs":"^2.0.1"},"gitHead":"4c410e395ab858010781e66704c704f59e1613ca","bugs":{"url":"https://github.com/krisselden/dag-map/issues"},"homepage":"https://github.com/krisselden/dag-map#readme","_id":"dag-map@2.0.0","_shasum":"192c7eaf130ce9523199bf0d867d53605824ebd1","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"krisselden","email":"kris.selden@gmail.com"},"dist":{"shasum":"192c7eaf130ce9523199bf0d867d53605824ebd1","size":7271,"noattachment":false,"key":"/dag-map/-/dag-map-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-map/download/dag-map-2.0.0.tgz"},"maintainers":[{"name":"chadhietala","email":""},{"name":"krisselden","email":"kris.selden@gmail.com"},{"name":"rwjblue","email":"me@rwjblue.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/dag-map-2.0.0.tgz_1472784766314_0.5796974282711744"},"directories":{},"publish_time":1472784769707,"_hasShrinkwrap":false,"_cnpm_publish_time":1472784769707,"_cnpmcore_publish_time":"2021-12-16T22:31:12.199Z"},"1.0.2":{"name":"dag-map","version":"1.0.2","description":"DAG stands for Directed acyclic graph. It is used to build a graph of dependencies checking that there isn't circular dependencies","main":"dist/dag-map.js","repository":{"type":"git","url":"https://github.com/krisselden/dag-map.git"},"scripts":{"build":"ember build","build:production":"ember build --environment=production","test":"ember test","test:server":"ember test --server","prepublish":"ember build --environment production"},"author":{"name":"Kris Selden"},"license":"MIT","devDependencies":{"broccoli-es6-module-transpiler":"^0.5.0","broccoli-stew":"^0.2.1","broccoli-uglify-js":"^0.1.3","ember-cli":"^0.2.0","es6-module-transpiler-amd-formatter":"^0.3.0","qunitjs":"^1.17.1"},"gitHead":"814bc4dd31696c4b979d15e82b5241708252af16","bugs":{"url":"https://github.com/krisselden/dag-map/issues"},"homepage":"https://github.com/krisselden/dag-map","_id":"dag-map@1.0.2","_shasum":"e8379f041000ed561fc515475c1ed2c85eece8d7","_from":".","_npmVersion":"2.7.0","_nodeVersion":"0.12.0","_npmUser":{"name":"chadhietala","email":"chadhietala@gmail.com"},"maintainers":[{"name":"chadhietala","email":""},{"name":"krisselden","email":"kris.selden@gmail.com"},{"name":"rwjblue","email":"me@rwjblue.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"dist":{"shasum":"e8379f041000ed561fc515475c1ed2c85eece8d7","size":6981,"noattachment":false,"key":"/dag-map/-/dag-map-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-map/download/dag-map-1.0.2.tgz"},"directories":{},"publish_time":1429635341160,"_hasShrinkwrap":false,"_cnpm_publish_time":1429635341160,"_cnpmcore_publish_time":"2021-12-16T22:31:12.406Z"},"1.0.1":{"name":"dag-map","version":"1.0.1","description":"DAG stands for Directed acyclic graph. It is used to build a graph of dependencies checking that there isn't circular dependencies","main":"dist/dag-map.js","repository":{"type":"git","url":"https://github.com/krisselden/dag-map.git"},"scripts":{"build":"ember build","build:production":"ember build --environment=production","test":"ember test","test:server":"ember test --server","prepublish":"ember build --environment production"},"author":{"name":"Kris Selden"},"license":"MIT","devDependencies":{"broccoli-es6-module-transpiler":"^0.5.0","broccoli-stew":"^0.2.1","broccoli-uglify-js":"^0.1.3","ember-cli":"^0.2.0","es6-module-transpiler-amd-formatter":"^0.3.0","qunitjs":"^1.17.1"},"gitHead":"09b6dae14f85d6a7ee984f559689fc843fae3002","bugs":{"url":"https://github.com/krisselden/dag-map/issues"},"homepage":"https://github.com/krisselden/dag-map","_id":"dag-map@1.0.1","_shasum":"95c70702ca3bbed8feb8273b0b8da682618c3600","_from":".","_npmVersion":"2.7.0","_nodeVersion":"0.12.0","_npmUser":{"name":"chadhietala","email":"chadhietala@gmail.com"},"maintainers":[{"name":"chadhietala","email":""},{"name":"krisselden","email":"kris.selden@gmail.com"},{"name":"rwjblue","email":"me@rwjblue.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"dist":{"shasum":"95c70702ca3bbed8feb8273b0b8da682618c3600","size":6347,"noattachment":false,"key":"/dag-map/-/dag-map-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-map/download/dag-map-1.0.1.tgz"},"directories":{},"publish_time":1429633739107,"_hasShrinkwrap":false,"_cnpm_publish_time":1429633739107,"_cnpmcore_publish_time":"2021-12-16T22:31:12.592Z"},"1.0.0":{"name":"dag-map","version":"1.0.0","description":"DAG stands for Directed acyclic graph. It is used to build a graph of dependencies checking that there isn't circular dependencies","main":"lib/dag.js","repository":{"type":"git","url":"https://github.com/krisselden/dag-map.git"},"scripts":{"build":"ember build --environment=production","test":"ember test","test-server":"ember test --server","start":"ember server"},"author":{"name":"Kris Selden"},"license":"MIT","devDependencies":{"broccoli-closure-compiler":"^0.2.0","broccoli-compile-modules":"git://github.com/eventualbuddha/broccoli-compile-modules","broccoli-concat":"0.0.7","broccoli-file-mover":"^0.4.0","broccoli-jshint":"~0.5.1","broccoli-merge-trees":"^0.1.4","broccoli-static-compiler":"~0.1.4","broccoli-string-replace":"0.0.2","ember-cli":"0.0.40","es6-module-transpiler-amd-formatter":"0.0.1","express":"^4.6.1","testem":"^0.6.17","git-repo-version":"0.0.2"},"gitHead":"69672202209ce94e8009ac31e27daa4b0931fe36","bugs":{"url":"https://github.com/krisselden/dag-map/issues"},"homepage":"https://github.com/krisselden/dag-map","_id":"dag-map@1.0.0","_shasum":"4b10ed75835a3d97e792c89c7900dbb06ee98409","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.32","_npmUser":{"name":"krisselden","email":"kris.selden@gmail.com"},"maintainers":[{"name":"chadhietala","email":""},{"name":"krisselden","email":"kris.selden@gmail.com"},{"name":"rwjblue","email":"me@rwjblue.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"dist":{"shasum":"4b10ed75835a3d97e792c89c7900dbb06ee98409","size":6286,"noattachment":false,"key":"/dag-map/-/dag-map-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-map/download/dag-map-1.0.0.tgz"},"directories":{},"publish_time":1422040013025,"_hasShrinkwrap":false,"_cnpm_publish_time":1422040013025,"_cnpmcore_publish_time":"2021-12-16T22:31:12.803Z"}},"readme":"# dag-map [![Build Status](https://travis-ci.org/krisselden/dag-map.png?branch=master)](https://travis-ci.org/krisselden/dag-map)\n\nA topologically ordered map of key/value pairs with a simple API for adding constraints.\n\nUsed for ordering initializers in Ember.  Has a flexible constraint syntax\nthat can add before/after contraints that can forward reference things\nyet to be added.\n\n## API\n\n```js\n// import DAGMap from \"dag-map\";\nconst DAGMap = require(\"dag-map\").default;\n\nlet map = new DAGMap();\n\n// map a key value pair\n// #add(\n//   key: string, value: any,\n//   before?: string[] | string | undefined,\n//   after?: string[] | string | undefined\n// )\nmap.add('eat', 'Eat Dinner');\n\n// add a key value pair with before and after constraints\nmap.add('serve', 'Serve the food', 'eat', 'set');\n\n// keys can be added after a key has been referenced\nmap.add('set', 'Set the table');\n\n// graph now is eat -> serve -> set\n\n// constraints can be an array\nmap.add('cook', 'Cook the roast and veggies', 'serve', ['prep', 'buy']);\n\nmap.add('wash', 'Wash the veggies', 'prep', 'buy');\nmap.add('buy', 'Buy roast and veggies');\nmap.add('prep', 'Prep veggies', undefined, 'wash');\n\n// log in order (multiple valid spots for set the table).\nmap.each((key, val) => console.log(`${key}: ${val}`));\n// set: Set the table\n// buy: Buy roast and veggies\n// wash: Wash the veggies\n// prep: Prep veggies\n// cook: Cook the roast and veggies\n// serve: Serve the food\n// eat: Eat Dinner\n```\n\n### Notes\n\nadd is aliased as addEdges for backwards compat.\neach is aliased as topsort for backwards compat.\n\n## Developing\n\n* `npm install`\n* `npm test` runs the tests headless\n* `npm run build` rebuild\n* `npm run docs` documentation\n","_attachments":{},"homepage":"https://github.com/krisselden/dag-map#readme","bugs":{"url":"https://github.com/krisselden/dag-map/issues"},"license":"MIT"}