{"_id":"vfile-statistics","_rev":"265197","name":"vfile-statistics","description":"vfile utility to count messages per category: failures, warnings, etc","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"wooorm","email":""}],"time":{"modified":"2023-03-27T18:58:02.000Z","created":"2016-08-21T13:57:00.006Z","2.0.1":"2023-02-06T15:41:05.710Z","2.0.0":"2021-05-05T14:06:17.000Z","1.1.4":"2020-03-02T15:22:38.632Z","1.1.3":"2019-05-30T11:58:46.782Z","1.1.2":"2018-11-19T18:59:37.477Z","1.1.1":"2018-05-03T19:48:51.267Z","1.1.0":"2017-07-17T14:45:05.834Z","1.0.0":"2016-08-21T13:57:00.006Z"},"users":{},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"repository":{"type":"git","url":"git+https://github.com/vfile/vfile-statistics.git"},"versions":{"2.0.1":{"name":"vfile-statistics","version":"2.0.1","description":"vfile utility to count messages per category: failures, warnings, etc","license":"MIT","keywords":["vfile","vfile-util","util","utility","virtual","file","message","count","statistics"],"repository":{"type":"git","url":"git+https://github.com/vfile/vfile-statistics.git"},"bugs":{"url":"https://github.com/vfile/vfile-statistics/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},{"name":"Brendan Abbott","email":"brendan.abbott@temando.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"vfile":"^5.0.0","vfile-message":"^3.0.0"},"devDependencies":{"@types/node":"^18.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","xo":"^0.53.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true},"gitHead":"89e02204e340f99347cb4c2d8d2cfe57214a9cb7","homepage":"https://github.com/vfile/vfile-statistics#readme","_id":"vfile-statistics@2.0.1","_nodeVersion":"19.3.0","_npmVersion":"9.2.0","dist":{"shasum":"2e1adae1cd3a45c1ed4f2a24bd103c3d71e4bce3","size":4111,"noattachment":false,"key":"/vfile-statistics/-/vfile-statistics-2.0.1.tgz","tarball":"http://name.csiicloud.com:7001/vfile-statistics/download/vfile-statistics-2.0.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vfile-statistics_2.0.1_1675698065559_0.5779107081086983"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-06T15:41:05.710Z","publish_time":1675698065710,"_cnpm_publish_time":1675698065710},"2.0.0":{"name":"vfile-statistics","version":"2.0.0","description":"vfile utility to count messages per category: failures, warnings, etc","license":"MIT","keywords":["vfile","vfile-util","util","utility","virtual","file","message","count","statistics"],"repository":{"type":"git","url":"git+https://github.com/vfile/vfile-statistics.git"},"bugs":{"url":"https://github.com/vfile/vfile-statistics/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},{"name":"Brendan Abbott","email":"brendan.abbott@temando.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"vfile-message":"^3.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","vfile":"^5.0.0","xo":"^0.39.0"},"scripts":{"prepack":"npm run build && npm run format","build":"rimraf \"*.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"rules":{"no-var":"off","prefer-arrow-callback":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true},"gitHead":"a8c8c4292cfb0d0737e1a0a729f7a82783ab87f7","homepage":"https://github.com/vfile/vfile-statistics#readme","_id":"vfile-statistics@2.0.0","_nodeVersion":"15.11.0","_npmVersion":"7.11.1","dist":{"shasum":"f04ee3e3c666809a3c10c06021becd41ea9c8037","size":3432,"noattachment":false,"key":"/vfile-statistics/-/vfile-statistics-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/vfile-statistics/download/vfile-statistics-2.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vfile-statistics_2.0.0_1620223576853_0.4530653741868542"},"_hasShrinkwrap":false,"publish_time":1620223577000,"_cnpm_publish_time":1620223577000,"_cnpmcore_publish_time":"2021-12-16T11:50:20.404Z"},"1.1.4":{"name":"vfile-statistics","version":"1.1.4","description":"vfile utility to count messages per category: failures, warnings, etc","license":"MIT","keywords":["vfile","vfile-util","util","utility","virtual","file","message","count","statistics"],"repository":{"type":"git","url":"git+https://github.com/vfile/vfile-statistics.git"},"bugs":{"url":"https://github.com/vfile/vfile-statistics/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},{"name":"Brendan Abbott","email":"brendan.abbott@temando.com"}],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","nyc":"^15.0.0","prettier":"^1.0.0","remark-cli":"^7.0.0","remark-preset-wooorm":"^6.0.0","tape":"^4.0.0","tinyify":"^2.0.0","vfile":"^4.0.0","xo":"^0.27.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.js\" && xo --fix","build-bundle":"browserify . -s vfileStatistics > vfile-statistics.js","build-mangle":"browserify . -s vfileStatistics -p tinyify > vfile-statistics.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"ignores":["vfile-statistics.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"d12e94541166ab3e4c4509a7a71baa76f0e95257","homepage":"https://github.com/vfile/vfile-statistics#readme","_id":"vfile-statistics@1.1.4","_nodeVersion":"13.9.0","_npmVersion":"6.13.7","dist":{"shasum":"b99fd15ecf0f44ba088cc973425d666cb7a9f245","size":2957,"noattachment":false,"key":"/vfile-statistics/-/vfile-statistics-1.1.4.tgz","tarball":"http://name.csiicloud.com:7001/vfile-statistics/download/vfile-statistics-1.1.4.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vfile-statistics_1.1.4_1583162558545_0.6356279982672666"},"_hasShrinkwrap":false,"publish_time":1583162558632,"_cnpm_publish_time":1583162558632},"1.1.3":{"name":"vfile-statistics","version":"1.1.3","description":"Count vfile messages per category","license":"MIT","keywords":["vfile","message","count","statistics"],"repository":{"type":"git","url":"git+https://github.com/vfile/vfile-statistics.git"},"bugs":{"url":"https://github.com/vfile/vfile-statistics/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},{"name":"Brendan Abbott","email":"brendan.abbott@temando.com"}],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","nyc":"^14.0.0","prettier":"^1.0.0","remark-cli":"^6.0.0","remark-preset-wooorm":"^5.0.0","tape":"^4.0.0","tinyify":"^2.0.0","vfile":"^4.0.0","xo":"^0.24.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.js\" && xo --fix","build-bundle":"browserify . -s vfileStatistics > vfile-statistics.js","build-mangle":"browserify . -s vfileStatistics -p tinyify > vfile-statistics.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"ignores":["vfile-statistics.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"05f4b0ec24ea38ce507dafc5f4342b67e5d4caf3","homepage":"https://github.com/vfile/vfile-statistics#readme","_id":"vfile-statistics@1.1.3","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"shasum":"e9c87071997fbcb4243764d2c3805e0bb0820c60","size":2911,"noattachment":false,"key":"/vfile-statistics/-/vfile-statistics-1.1.3.tgz","tarball":"http://name.csiicloud.com:7001/vfile-statistics/download/vfile-statistics-1.1.3.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vfile-statistics_1.1.3_1559217526564_0.08022535859401736"},"_hasShrinkwrap":false,"publish_time":1559217526782,"_cnpm_publish_time":1559217526782},"1.1.2":{"name":"vfile-statistics","version":"1.1.2","description":"Count vfile messages per category","license":"MIT","keywords":["vfile","message","count","statistics"],"repository":{"type":"git","url":"git+https://github.com/vfile/vfile-statistics.git"},"bugs":{"url":"https://github.com/vfile/vfile-statistics/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},{"name":"Brendan Abbott","email":"brendan.abbott@temando.com"}],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","nyc":"^13.0.0","prettier":"^1.12.1","remark-cli":"^6.0.0","remark-preset-wooorm":"^4.0.0","tape":"^4.0.0","tinyify":"^2.4.3","vfile":"^3.0.0","xo":"^0.23.0"},"scripts":{"format":"remark . -qfo && prettier --write '**/*.js' && xo --fix","build-bundle":"browserify . -s vfileStatistics > vfile-statistics.js","build-mangle":"browserify . -s vfileStatistics -p tinyify > vfile-statistics.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"no-var":"off","prefer-arrow-callback":"off","object-shorthand":"off"},"ignores":["vfile-statistics.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"857da459c4f2446e230e5e64482f6219828d09eb","homepage":"https://github.com/vfile/vfile-statistics#readme","_id":"vfile-statistics@1.1.2","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"c50132627e4669a3afa07c64ff1e7aa7695e8151","size":2810,"noattachment":false,"key":"/vfile-statistics/-/vfile-statistics-1.1.2.tgz","tarball":"http://name.csiicloud.com:7001/vfile-statistics/download/vfile-statistics-1.1.2.tgz"},"maintainers":[{"name":"wooorm","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vfile-statistics_1.1.2_1542653977366_0.3562127107158555"},"_hasShrinkwrap":false,"publish_time":1542653977477,"_cnpm_publish_time":1542653977477},"1.1.1":{"name":"vfile-statistics","version":"1.1.1","description":"Count vfile messages per category","license":"MIT","keywords":["vfile","message","count","statistics"],"repository":{"type":"git","url":"git+https://github.com/vfile/vfile-statistics.git"},"bugs":{"url":"https://github.com/vfile/vfile-statistics/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},{"name":"Brendan Abbott","email":"brendan.abbott@temando.com"}],"files":["index.js"],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","esmangle":"^1.0.1","nyc":"^11.0.0","prettier":"^1.12.1","remark-cli":"^5.0.0","remark-preset-wooorm":"^4.0.0","tape":"^4.0.0","vfile":"^2.0.0","xo":"^0.20.0"},"scripts":{"format":"remark . -qfo && prettier --write '**/*.js' && xo --fix","build-bundle":"browserify index.js --bare -s vfileStatistics > vfile-statistics.js","build-mangle":"esmangle vfile-statistics.js > vfile-statistics.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"no-var":"off","prefer-arrow-callback":"off","object-shorthand":"off"},"ignores":["vfile-statistics.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"099d8a6a39369bda3ea99270291f3af90a4b1055","homepage":"https://github.com/vfile/vfile-statistics#readme","_id":"vfile-statistics@1.1.1","_npmVersion":"6.0.0","_nodeVersion":"9.5.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"a22fd4eb844c9eaddd781ad3b3246db88375e2e3","size":2714,"noattachment":false,"key":"/vfile-statistics/-/vfile-statistics-1.1.1.tgz","tarball":"http://name.csiicloud.com:7001/vfile-statistics/download/vfile-statistics-1.1.1.tgz"},"maintainers":[{"name":"wooorm","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vfile-statistics_1.1.1_1525376931177_0.67744887222955"},"_hasShrinkwrap":false,"publish_time":1525376931267,"_cnpm_publish_time":1525376931267},"1.1.0":{"name":"vfile-statistics","version":"1.1.0","description":"Count vfile messages per category","license":"MIT","keywords":["vfile","message","count","statistics"],"dependencies":{},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/vfile/vfile-statistics.git"},"bugs":{"url":"https://github.com/vfile/vfile-statistics/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},{"name":"Brendan Abbott","email":"brendan.abbott@temando.com"}],"devDependencies":{"browserify":"^14.1.0","esmangle":"^1.0.1","nyc":"^11.0.0","remark-cli":"^3.0.0","remark-preset-wooorm":"^3.0.0","tape":"^4.0.0","vfile":"^2.0.0","xo":"^0.18.0"},"scripts":{"build-md":"remark . -qfo","build-bundle":"browserify index.js --bare -s vfileStatistics > vfile-statistics.js","build-mangle":"esmangle vfile-statistics.js > vfile-statistics.min.js","build":"npm run build-md && npm run build-bundle && npm run build-mangle","lint":"xo","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run build && npm run lint && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"xo":{"space":true,"esnext":false,"ignores":["vfile-statistics.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"2f7dae48a312f105388c2b500aaa0b676e8b0885","homepage":"https://github.com/vfile/vfile-statistics#readme","_id":"vfile-statistics@1.1.0","_shasum":"02104c60fdeed1d11b1f73ad65330b7634b3d895","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"02104c60fdeed1d11b1f73ad65330b7634b3d895","size":2434,"noattachment":false,"key":"/vfile-statistics/-/vfile-statistics-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/vfile-statistics/download/vfile-statistics-1.1.0.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vfile-statistics-1.1.0.tgz_1500302704924_0.12996714375913143"},"directories":{},"publish_time":1500302705834,"_hasShrinkwrap":false,"_cnpm_publish_time":1500302705834},"1.0.0":{"name":"vfile-statistics","version":"1.0.0","description":"Count vfile messages per category","license":"MIT","keywords":["vfile","message","count","statistics"],"dependencies":{},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/wooorm/vfile-statistics.git"},"bugs":{"url":"https://github.com/wooorm/vfile-statistics/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"devDependencies":{"browserify":"^13.0.1","esmangle":"^1.0.1","nyc":"^8.1.0","remark-cli":"^1.0.0","remark-comment-config":"^4.0.0","remark-github":"^5.0.0","remark-lint":"^4.0.0","remark-validate-links":"^4.0.0","tape":"^4.0.0","vfile":"^2.0.0","xo":"^0.16.0"},"scripts":{"build-md":"remark . --quiet --frail","build-bundle":"browserify index.js --bare -s vfileStatistics > vfile-statistics.js","build-mangle":"esmangle vfile-statistics.js > vfile-statistics.min.js","build":"npm run build-md && npm run build-bundle && npm run build-mangle","lint":"xo","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run build && npm run lint && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"xo":{"space":true,"ignores":["vfile-statistics.js"]},"remarkConfig":{"output":true,"plugins":{"comment-config":null,"github":null,"lint":{"heading-increment":false,"list-item-spacing":false},"validate-links":null},"settings":{"bullet":"*"}},"gitHead":"487581005ae094d228d3d90fef1720fc586d25d9","homepage":"https://github.com/wooorm/vfile-statistics#readme","_id":"vfile-statistics@1.0.0","_shasum":"003d356c0f3e0233f3a2271c65e2acee5ed4d0f8","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"003d356c0f3e0233f3a2271c65e2acee5ed4d0f8","size":2351,"noattachment":false,"key":"/vfile-statistics/-/vfile-statistics-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/vfile-statistics/download/vfile-statistics-1.0.0.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/vfile-statistics-1.0.0.tgz_1471787818320_0.027119449339807034"},"directories":{},"publish_time":1471787820006,"_cnpm_publish_time":1471787820006,"_hasShrinkwrap":false}},"readme":"# vfile-statistics\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n[vfile][] utility to count messages per category (fatal, warn, info, etc).\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`statistics(file)`](#statisticsfile)\n    *   [`Statistics`](#statistics)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis tiny package gives you stats about messages in files.\n\n## When should I use this?\n\nThis is really tiny, you could do it yourself, but this is useful as a building\nblock.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 14.14+ and 16.0+), install with [npm][]:\n\n```sh\nnpm install vfile-statistics\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {statistics} from 'https://esm.sh/vfile-statistics@2'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {statistics} from 'https://esm.sh/vfile-statistics@2?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {VFile} from 'vfile'\nimport {statistics} from 'vfile-statistics'\n\nconst file = new VFile({path: '~/example.md'})\n\nfile.message('This could be better')\nfile.message('That could be better')\n\ntry {\n  file.fail('This is terribly wrong')\n} catch {}\n\nfile.info('This is perfect')\n\nconsole.log(statistics(file))\n```\n\nYields:\n\n```js\n{fatal: 1, nonfatal: 3, warn: 2, info: 1, total: 4}\n```\n\n## API\n\nThis package exports the identifier [`statistics`][api-statistics].\nThere is no default export.\n\n### `statistics(file)`\n\nGet stats for a file, list of files, or list of messages.\n\n###### Parameters\n\n*   `file` ([`VFile`][vfile], [`VFileMessage`][vfile-message],\n    `Array<VFile | VFileMessage>`, optional)\n    — file, message, or list of files or messages.\n\n###### Returns\n\nStatistics ([`Statistics`][api-statistics-map]).\n\n### `Statistics`\n\nStatistics (TypeScript type).\n\n###### Fields\n\n*   `fatal` — fatal errors (`fatal: true`)\n*   `warn` — warning messages (`fatal: false`)\n*   `info` — informational messages (`fatal: null | undefined`)\n*   `nonfatal` — warning or info messages\n*   `total` — all messages\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type [`Statistics`][api-statistics-map].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with all maintained\nversions of Node.js.\nAs of now, that is Node.js 14.14+ and 16.0+.\nOur projects sometimes work with older versions, but this is not guaranteed.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`vfile/.github`][health] for ways to\nget started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/vfile/vfile-statistics/workflows/main/badge.svg\n\n[build]: https://github.com/vfile/vfile-statistics/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/vfile/vfile-statistics.svg\n\n[coverage]: https://codecov.io/github/vfile/vfile-statistics\n\n[downloads-badge]: https://img.shields.io/npm/dm/vfile-statistics.svg\n\n[downloads]: https://www.npmjs.com/package/vfile-statistics\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/vfile-statistics.svg\n\n[size]: https://bundlephobia.com/result?p=vfile-statistics\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/vfile/vfile/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[contributing]: https://github.com/vfile/.github/blob/main/contributing.md\n\n[support]: https://github.com/vfile/.github/blob/main/support.md\n\n[health]: https://github.com/vfile/.github\n\n[coc]: https://github.com/vfile/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[vfile]: https://github.com/vfile/vfile\n\n[vfile-message]: https://github.com/vfile/vfile-message\n\n[api-statistics]: #statisticsfile\n\n[api-statistics-map]: #statistics\n","_attachments":{},"homepage":"https://github.com/vfile/vfile-statistics#readme","bugs":{"url":"https://github.com/vfile/vfile-statistics/issues"},"license":"MIT"}