Name: js-handler/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/package.json
| 1: | { |
| 2: | "name": "runforcover", |
| 3: | "version": "0.0.2", |
| 4: | "description": "require plugin for js code coverage using bunker", |
| 5: | "main": "index.js", |
| 6: | "directories": { |
| 7: | "lib": ".", |
| 8: | "test": "test" |
| 9: | }, |
| 10: | "dependencies": { |
| 11: | "bunker": "0.1.X" |
| 12: | }, |
| 13: | "scripts": { |
| 14: | "test": "node test/index.js" |
| 15: | }, |
| 16: | "repository": { |
| 17: | "type": "git", |
| 18: | "url": "http://github.com/chrisdickinson/node-runforcover.git" |
| 19: | }, |
| 20: | "keywords": [ |
| 21: | "code", |
| 22: | "coverage", |
| 23: | "bunker" |
| 24: | ], |
| 25: | "author": { |
| 26: | "name": "Chris Dickinson", |
| 27: | "email": "[email protected]", |
| 28: | "url": "http://neversaw.us" |
| 29: | }, |
| 30: | "license": "new BSD", |
| 31: | "engine": { |
| 32: | "node": ">=0.4" |
| 33: | }, |
| 34: | "readme": "runforcover\n======\n\nRunforcover is a require-hook library that uses node-bunker to provide code coverage data\nfor your unit test library, whatever it might be.\n\nmethods\n=======\nvar runforcover = require('runforcover');\n\nvar coverage = runforcover.cover([RegExp | path]);\n-------\n\nAttach runforcover to the global `require` object and patch `require.extensions['.js']` to\nprovide coverage metadata for all files required after this point. Returns a function\nobject that can be called to obtain a object keying files to `CoverageData` objects, with \na method for releasing control back to vanilla `require`. Usage:\n\n````javascript\n\nvar coverage = runforcover.cover(/.*/g);\n\nrequire('some/library');\n\ncoverage(function(coverageData) {\n // coverageData is an object keyed by filename.\n var stats = coverageData['/full/path/to/file.js'].stats()\n\n // the percentage of lines run versus total lines in file\n console.log(stats.percentage);\n\n // the number of missing lines\n console.log(stats.missing);\n\n // the number of lines run (seen)\n console.log(stats.seen);\n\n // an array of line objects representing 'missed' lines\n stats.lines;\n\n stats.lines.forEach(function(line) {\n // the line number of the line:\n console.log(line.number);\n\n // returns a string containing the source data for the line:\n console.log(line.source()); \n }); \n \n // return control back to the original require function\n coverage.release(); \n});\n````\n\nlicense\n=======\nnew BSD.\n", |
| 35: | "readmeFilename": "README.markdown", |
| 36: | "bugs": { |
| 37: | "url": "https://github.com/chrisdickinson/node-runforcover/issues" |
| 38: | }, |
| 39: | "_id": "[email protected]", |
| 40: | "dist": { |
| 41: | "shasum": "983f204c35204a4f8f64ba36974f4234850ed6fe" |
| 42: | }, |
| 43: | "_from": "[email protected]~0.0.2", |
| 44: | "_resolved": "https://registry.npmjs.org/runforcover/-/runforcover-0.0.2.tgz" |
| 45: | } |
