{
  "_args": [
    [
      {
        "raw": "heimdalljs-graph@^0.3.1",
        "scope": null,
        "escapedName": "heimdalljs-graph",
        "name": "heimdalljs-graph",
        "rawSpec": "^0.3.1",
        "spec": ">=0.3.1 <0.4.0",
        "type": "range"
      },
      "/home/travis/build/lukesargeant/ember-sparkline/node_modules/ember-cli"
    ]
  ],
  "_from": "heimdalljs-graph@>=0.3.1 <0.4.0",
  "_id": "heimdalljs-graph@0.3.4",
  "_inCache": true,
  "_location": "/heimdalljs-graph",
  "_nodeVersion": "8.9.0",
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/heimdalljs-graph-0.3.4.tgz_1510264524898_0.9565544759389013"
  },
  "_npmUser": {
    "name": "stefanpenner",
    "email": "stefan.penner@gmail.com"
  },
  "_npmVersion": "5.5.1",
  "_phantomChildren": {},
  "_requested": {
    "raw": "heimdalljs-graph@^0.3.1",
    "scope": null,
    "escapedName": "heimdalljs-graph",
    "name": "heimdalljs-graph",
    "rawSpec": "^0.3.1",
    "spec": ">=0.3.1 <0.4.0",
    "type": "range"
  },
  "_requiredBy": [
    "/ember-cli"
  ],
  "_resolved": "https://registry.npmjs.org/heimdalljs-graph/-/heimdalljs-graph-0.3.4.tgz",
  "_shasum": "0bd75797beeaa20b0ed59017aed3b2d95312acee",
  "_shrinkwrap": null,
  "_spec": "heimdalljs-graph@^0.3.1",
  "_where": "/home/travis/build/lukesargeant/ember-sparkline/node_modules/ember-cli",
  "author": {
    "name": "David J. Hamilton, Stefan Penner"
  },
  "bugs": {
    "url": "https://github.com/heimdalljs/heimdalljs-graph/issues"
  },
  "dependencies": {},
  "description": "`heimdalljs-graph` is intended to be the primary entry point for doing visualizations with data gathered by [Heimdall](https://github.com/heimdalljs-lib).",
  "devDependencies": {
    "babel-plugin-external-helpers": "^6.18.0",
    "babel-plugin-transform-runtime": "^6.15.0",
    "babel-preset-es2015": "^6.18.0",
    "babel-runtime": "^6.20.0",
    "chai": "^3.5.0",
    "eslint": "^3.14.0",
    "heimdalljs": "^0.2.3",
    "mocha": "^3.2.0",
    "rollup": "^0.37.0",
    "rollup-plugin-babel": "^2.7.0",
    "rollup-plugin-commonjs": "^5.0.5",
    "rollup-plugin-json": "^2.0.2",
    "rollup-plugin-node-resolve": "^2.0.0"
  },
  "directories": {},
  "dist": {
    "integrity": "sha512-2DXgPIxdatgtBOjlh5qeVeHIGMTC2V9ujEvUhVJBVOVwqnU41g1OuGaRugLi6rvk0E+u1koYkfPeptybV8ZJ4g==",
    "shasum": "0bd75797beeaa20b0ed59017aed3b2d95312acee",
    "tarball": "https://registry.npmjs.org/heimdalljs-graph/-/heimdalljs-graph-0.3.4.tgz"
  },
  "files": [
    "src/",
    "dist/",
    "!dist/cjs/tests/",
    "!dist/amd/tests/"
  ],
  "gitHead": "74c3731ff9b7c2a8118eb95991b7ff0c0cbfeaac",
  "homepage": "https://github.com/heimdalljs/heimdalljs-graph#readme",
  "jsnext:main": "dist/es6/index.js",
  "license": "MIT",
  "main": "dist/cjs/index.js",
  "maintainers": [
    {
      "name": "runspired",
      "email": "runspired@gmail.com"
    },
    {
      "name": "hjdivad",
      "email": "npm@hjdivad.com"
    },
    {
      "name": "stefanpenner",
      "email": "stefan.penner@gmail.com"
    },
    {
      "name": "rwjblue",
      "email": "me@rwjblue.com"
    }
  ],
  "name": "heimdalljs-graph",
  "optionalDependencies": {},
  "readme": "# heimdalljs-graph\n\n`heimdalljs-graph` is intended to be the primary entry point for doing visualizations with data\ngathered by [Heimdall](https://github.com/heimdalljs-lib). \n\n## Loading Data\n\n### Loading from JSON File\n\nExample:\n\n```js\nconst heimdallGraph = require('heimdalljs-graph');\n\nlet graph = heimdallGraph.loadFromFile('some/path/on/disk.json');\n```\n\n### Loading from a Heimdall Node\n\nExample:\n\n```js\nconst heimdallGraph = require('heimdalljs-graph');\n\nlet graph = heimdallGraph.loadFromNode(heimdallNode);\n```\n\n## Interacting with the Graph\n\nOnce data is loaded, the resulting object is called a \"node\". Each node in the graph provides \nan API for iterating its subgraph as well as iterating its own stats. \n\nThe API that each node supports is:\n\n* `label`\n* `toJSON`\n* `adjacentIterator`\n* `dfsIterator`\n* `bfsIterator`\n\n### label\n\nA POJO property that describes the node.  It will always include a `name`\nproperty and for broccoli nodes will include a `broccoliNode` property.\n\nExample:\n\n```js\nnode.label === {\n  name: 'TreeMerger (allTrees)',\n  broccoliNode: true,\n}\n```\n\n### toJSON()\n\nReturns a POJO that represents the serialized subgraph rooted at this node (the\nentire tree if called on the root node).\n\nThere is no particular guarantee about the format (as it will change over time),\nbut a general example might be:\n\n```js\n// for a graph\n//  TreeMerger\n//    |- Babel_1\n//    |- Babel_2\n//    |--|- Funnel\nconsole.log(JSON.stringify(node.toJSON(), null, 2));\n// might print\n//\n{\n  nodes: [{\n    id: 1,\n    children: [2,3],\n    stats: {\n      time: {\n        self: 5000000,\n      },\n      fs: {\n        lstat: {\n          count: 2,\n          time: 2000000\n        }\n      },\n      own: {\n      }\n    }\n  }, {\n    // ...\n  }]\n}\n```\n\n### dfsIterator(until)\n\nReturns an iterator that yields every node in the subgraph sourced at this node.\nNodes are yielded in depth-first order.  If the optional parameter `until` is\npassed, nodes for which `until` returns `true` will not be yielded, nor will\nnodes in their subgraph, unless those nodes are reachable by some other path.\n\nExample:\n\n```js\n// for a graph\n//  TreeMerger\n//    |- Babel_1\n//    |--|- Funnel\n//    |- Babel_2\nfor (n of node.dfsIterator()) {\n  console.log(n.label.name);\n}\n// prints\n//\n// TreeMerger\n// Babel_1\n// Funnel\n// Babel_2\n```\n\n### bfsIterator()\n\nReturns an iterator that yields every node in the subgraph sourced at this node.\nNodes are yielded in breadth-first order.  If the optional parameter `until` is\npassed, nodes for which `until` returns `true` will not be yielded, nor will\nnodes in their subgraph, unless those nodes are reachable by some other path.\n\n\nExample:\n```js\n// for a tree\n//  TreeMerger\n//    |- Babel_1\n//    |--|- Funnel\n//    |- Babel_2\nfor (n of node.bfsIterator()) {\n  console.log(n.label.name);\n}\n// prints\n//\n// TreeMerger\n// Babel_1\n// Babel_2\n// Funnel\n```\n\n### adjacentIterator()\n\nReturns an iterator that yields each adjacent outbound node. There is no guarantee\nabout the order in which they are yielded.\n\nExample:\n\n```js\n// for a graph\n//  TreeMerger\n//    |- Babel_1\n//    |--|- Funnel\n//    |- Babel_2\nfor (n of node.childIterator()) {\n  console.log(n.label.name);\n}\n// prints\n//\n// Babel_1\n// Babel_2\n```\n\n### statsIterator()\n\nReturns an iterator that yields `[name, value]` pairs of stat names and values.\n\nExample:\n```js\n//  for a typical broccoli node \nfor ([statName, statValue] of node.statsIterator()) {\n  console.log(statName, statValue);\n}\n// prints\n//\n// \"time.self\" 64232794\n// \"fs.statSync.count\" 40\n// \"fs.statSync.time\" 401232123\n// ...\n```\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+ssh://git@github.com/heimdalljs/heimdalljs-graph.git"
  },
  "scripts": {
    "build": "node ./scripts/build.js",
    "prepublish": "npm run build",
    "pretest": "npm run build",
    "test": "mocha dist/cjs/tests/index.js",
    "test:debug": "npm run build && mocha --no-timeouts debug dist/cjs/tests/index.js"
  },
  "version": "0.3.4"
}
