{"_id":"istanbul-threshold-checker","_rev":"5-d76f51e1be43e3b1f817988186ab0d96","name":"istanbul-threshold-checker","description":"Utility module to check istanbul thresholds","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"istanbul-threshold-checker","version":"0.1.0","description":"Utility module to check istanbul thresholds","main":"index.js","dependencies":{"istanbul":"0.3.*","lodash":"3.6.*"},"devDependencies":{"assert":"1.3.*","gulp":"3.8.*","gulp-istanbul":"0.8.*","gulp-jscs":"1.4.*","gulp-mocha":"2.0.*","istanbul-text-full-reporter":"0.1.*","sinon":"1.14.*"},"repository":{"type":"git","url":"https://github.com/peterjwest/istanbul-threshold-checker.git"},"author":{"name":"Peter West"},"license":"MIT","bugs":{"url":"https://github.com/peterjwest/istanbul-threshold-checker/issues"},"homepage":"https://github.com/peterjwest/istanbul-threshold-checker","gitHead":"976175250acc09051ecaff0f0f756f05986e7bed","_id":"istanbul-threshold-checker@0.1.0","scripts":{},"_shasum":"0e1442c017cb27a85f781734fefd2126405ca39c","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"peterjwest","email":"peterjwest3@gmail.com"},"maintainers":[{"name":"peterjwest","email":"peterjwest3@gmail.com"}],"dist":{"shasum":"0e1442c017cb27a85f781734fefd2126405ca39c","tarball":"https://registry.npmjs.org/istanbul-threshold-checker/-/istanbul-threshold-checker-0.1.0.tgz","integrity":"sha512-50uqabaVYk7kkc6IqtwpdSHbSwCX+eCrm0LtDfqZgdFE45p8z3tjFNofiPKhJmViJEynabVVbOHW5jsdrymUvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFPvHQuPqQHy+uPIVRQbJppSp9E/3iG2+uZDDdDdwu4xAiBrogxi4G50rkWPIpY5w2WsNGr+dACm4OBO3VCOzPbiOg=="}]}},"0.2.0":{"name":"istanbul-threshold-checker","version":"0.2.0","description":"Utility module to check istanbul thresholds","main":"index.js","dependencies":{"istanbul":"0.3.*","lodash":"3.6.*"},"devDependencies":{"assert":"1.3.*","gulp":"3.8.*","gulp-istanbul":"0.8.*","gulp-jscs":"1.4.*","gulp-mocha":"2.0.*","istanbul-text-full-reporter":"0.1.*","sinon":"1.14.*"},"repository":{"type":"git","url":"git+https://github.com/peterjwest/istanbul-threshold-checker.git"},"author":{"name":"Peter West"},"license":"MIT","bugs":{"url":"https://github.com/peterjwest/istanbul-threshold-checker/issues"},"homepage":"https://github.com/peterjwest/istanbul-threshold-checker","gitHead":"2a11e28920f8bad78fe4de82a6059c9fadcad9d2","_id":"istanbul-threshold-checker@0.2.0","scripts":{},"_shasum":"6e0a42464fd92f3adf8c417ae7b48d27b8677161","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"peterjwest","email":"peterjwest3@gmail.com"},"maintainers":[{"name":"peterjwest","email":"peterjwest3@gmail.com"}],"dist":{"shasum":"6e0a42464fd92f3adf8c417ae7b48d27b8677161","tarball":"https://registry.npmjs.org/istanbul-threshold-checker/-/istanbul-threshold-checker-0.2.0.tgz","integrity":"sha512-TkJol4QlpF89cX+DEsrJB5+FOd7sRdrZKByX34jLqZeCH8YMl3Cj29IhRJiqPNWenFeqLCb+vrP7RptipBubFw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEfJhnnNyVwDZKvKY1Cc1bAB6vVk3NzlKGkqYXRBt0EkAiEAwlVBegsefs8k0Jk60l+Xea5MbTfXun3qFzCxiYfibEg="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/istanbul-threshold-checker-0.2.0.tgz_1480002568678_0.3604142153635621"}},"0.2.1":{"name":"istanbul-threshold-checker","version":"0.2.1","description":"Utility module to check istanbul thresholds","main":"index.js","dependencies":{"istanbul":"~0.4.5","lodash":"~4.17.2"},"devDependencies":{"assert":"~1.4.1","gulp":"~3.9.1","gulp-istanbul":"~1.1.1","gulp-jscs":"~4.0.0","gulp-mocha":"~3.0.1","istanbul-text-full-reporter":"~0.1.0","sinon":"~1.17.6"},"repository":{"type":"git","url":"git+https://github.com/peterjwest/istanbul-threshold-checker.git"},"author":{"name":"Peter West"},"license":"MIT","bugs":{"url":"https://github.com/peterjwest/istanbul-threshold-checker/issues"},"homepage":"https://github.com/peterjwest/istanbul-threshold-checker","gitHead":"d1a7f4a7fb8838db26c67ce6e0e9ad91a785c0ea","_id":"istanbul-threshold-checker@0.2.1","scripts":{},"_shasum":"c5dc94e8f2cc5cd3ffd335452f84b553c4248331","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"peterjwest","email":"peterjwest3@gmail.com"},"maintainers":[{"name":"peterjwest","email":"peterjwest3@gmail.com"}],"dist":{"shasum":"c5dc94e8f2cc5cd3ffd335452f84b553c4248331","tarball":"https://registry.npmjs.org/istanbul-threshold-checker/-/istanbul-threshold-checker-0.2.1.tgz","integrity":"sha512-KBEXIAIr7ANpZHX4qkRvbIV5XYyMXn9hwBjddR/ixG8b/M+K1y8a6h4Ca+3HUn2WUr2WnRryhNeM+KXXJROqww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJ91G5ee1oykwd377kXgDhCQUHmJ3iSNbVTYO3tbBAmwIhAKlfhl59dijXx6xjow3y1gEqqiaCHnk68gCodwA1bWcV"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/istanbul-threshold-checker-0.2.1.tgz_1480002579658_0.1931742529850453"}}},"readme":"# Istanbul threshold checker\nChecks an instanbul coverage report against thresholds\n\n## Usage\n\nInstall with npm\n\n    npm install istanbul-threshold-checker\n\nUse by feeding a coverge report from istanbul:\n\n    var collector = new require('istanbul').Collector();\n    collector.add(coverageJsonObject);\n    var coverage = collector.getFinalCoverage();\n\n    var checker = require('istanbul-threshold-checker');\n    var results = checker.checkFailures(thresholds, coverage);\n\n\n## Thresholds\n\nThresholds can be specified in a variety of formats. Each threshold value can be specified as:\n\n- A positive number - checks coverage meets this value as a percentage\n- A negative number - checks there are no more coverage gaps than this number\n- Any falsey value - skips checking this threshold\n\nThresholds can be checked across all files or against each file using `global` and `each` keys respectively:\n\n    var thresholds = {\n        global: {\n            statements: 100,\n            branches: 90,\n            lines: 70,\n            functions: -10\n        },\n        each: {\n            statements: 0,\n            branches: -20,\n            lines: 60,\n            functions: 100\n        }\n    };\n\nYou can exclude `global` or `each` if you only want to check global or per file coverage.\n\nEach set of thresholds can also be a single value, which checks that value across all metrics:\n\n    var thresholds = {\n        global: 80,\n        each: -10\n    };\n\n\n## Results\n\nThe checker returns results in the following format:\n\n    [{\n        type: 'lines',\n        global: { failed: false, value: 90 },\n        each: { failed: true, failures: ['/file/test.js'] }\n    }, {\n        type: 'statements',\n        global: { failed: true, value: 50 },\n        each: { failed: true, failures: ['/file/test2.js'] }\n    }, {\n        type: 'functions',\n        global: { failed: true, value: -10 },\n        each: { failed: true, failures: ['/file/test2.js'] }\n    }, {\n        type: 'branches',\n        global: { failed: true, value: 66.67 },\n        each: { failed: false, failures: [] }\n    }]\n","maintainers":[{"name":"peterjwest","email":"peterjwest3@gmail.com"}],"time":{"modified":"2022-06-19T03:09:01.448Z","created":"2015-04-28T11:41:52.669Z","0.1.0":"2015-04-28T11:41:52.669Z","0.2.0":"2016-11-24T15:49:30.548Z","0.2.1":"2016-11-24T15:49:41.537Z"},"homepage":"https://github.com/peterjwest/istanbul-threshold-checker","repository":{"type":"git","url":"git+https://github.com/peterjwest/istanbul-threshold-checker.git"},"author":{"name":"Peter West"},"bugs":{"url":"https://github.com/peterjwest/istanbul-threshold-checker/issues"},"license":"MIT","readmeFilename":"README.md"}