{
  "name": "bunker",
  "version": "0.1.2",
  "description": "code coverage in native javascript",
  "main": "index.js",
  "directories": {
    "lib": ".",
    "example": "example",
    "test": "test"
  },
  "dependencies": {
    "burrito": ">=0.2.5 <0.3"
  },
  "devDependencies": {
    "tap": "~0.2.4"
  },
  "scripts": {
    "test": "tap test/*.js"
  },
  "repository": {
    "type": "git",
    "url": "http://github.com/substack/node-bunker.git"
  },
  "keywords": [
    "code",
    "coverage"
  ],
  "author": {
    "name": "James Halliday",
    "email": "mail@substack.net",
    "url": "http://substack.net"
  },
  "license": "MIT/X11",
  "engine": {
    "node": ">=0.4"
  },
  "readme": "bunker\n======\n\nBunker is a module to calculate code coverage using native javascript\n[burrito](https://github.com/substack/node-burrito) AST trickery.\n\n[![build status](https://secure.travis-ci.org/substack/node-bunker.png)](http://travis-ci.org/substack/node-bunker)\n\n![code coverage](http://substack.net/images/code_coverage.png)\n\nexamples\n========\n\ntiny\n----\n\n````javascript\nvar bunker = require('bunker');\nvar b = bunker('var x = 0; for (var i = 0; i < 30; i++) { x++ }');\n\nvar counts = {};\n\nb.on('node', function (node) {\n    if (!counts[node.id]) {\n        counts[node.id] = { times : 0, node : node };\n    }\n    counts[node.id].times ++;\n});\n\nb.run();\n\nObject.keys(counts).forEach(function (key) {\n    var count = counts[key];\n    console.log(count.times + ' : ' + count.node.source());\n});\n````\n\noutput:\n\n    $ node example/tiny.js \n    1 : var x=0;\n    31 : i<30\n    30 : i++\n    30 : x++;\n    30 : x++\n\nmethods\n=======\n\nvar bunker = require('bunker');\n\nvar b = bunker(src)\n-------------------\n\nCreate a new bunker code coverageifier with some source `src`.\n\nThe bunker object `b` is an `EventEmitter` that emits `'node'` events with two\nparameters:\n\n* `node` - the [burrito](https://github.com/substack/node-burrito) node object\n* `stack` - the stack, [stackedy](https://github.com/substack/node-stackedy) style\n\nb.include(src)\n--------------\n\nInclude some source into the bunker.\n\nb.compile()\n-----------\n\nReturn the source wrapped with burrito.\n\nb.assign(context={})\n--------------------\n\nAssign the statement-tracking functions into `context`.\n\nb.run(context={})\n-----------------\n\nRun the source using `vm.runInNewContext()` with some `context`.\nThe statement-tracking functions will be added to `context` by `assign()`.\n",
  "readmeFilename": "README.markdown",
  "bugs": {
    "url": "https://github.com/substack/node-bunker/issues"
  },
  "homepage": "https://github.com/substack/node-bunker",
  "_id": "bunker@0.1.2",
  "_from": "bunker@0.1.X"
}
