{"name":"badgen","version":"2.4.2","author":{"name":"Amio","email":"amio.cn@gmail.com"},"license":"ISC","_id":"badgen@2.4.2","maintainers":[{"name":"amio","email":"amio.cn@gmail.com"}],"homepage":"https://github.com/amio/badgen#readme","bugs":{"url":"https://github.com/amio/badgen/issues"},"dist":{"shasum":"2d1ea72838170ee933b455ac7f3d4e14300e1c52","tarball":"http://registry-npm.ywwl.com/badgen/download/badgen-2.4.2.tgz","fileCount":7,"integrity":"sha512-tndMS7dZ24nDX3yhAir4IyDVfjzWRDqNLHR4LOa59VMwNU3QT3mLcc+s5Z3ujgP9bJ3SjOQtODkb7eUbQri7Vg==","signatures":[{"sig":"MEYCIQDQNTYr7tDbi2eOG9xWuVGP1aldxAQcIlLtfv0ffqbJ+AIhANjyuccGEoxJkrFytXG2A3DoVv65pfltlNaDyJsadAQs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgQAdCRA9TVsSAnZWagAAWMAP/0eeocM9BHZTX9apESYt\nf1LavM3YyweyG3JIh/xgDM8QNOYPX5LccfALxmNvLogGgGBuJ2Yd87CdvTZA\n6JSr/xHeOJ7ngL7XegkQrBMR9rZtXmE23K0s7wzt969jgGYkWLw3QeM2A0yP\ndRsxc3XQcWKqIsKtlQBsIMFGMOdPqhmnBclDfNXtsk5ADUKnLSamLGz6O4zb\n/ZVzXBrFCGf5r28GhbVuoaEAZSspgtNPoae7NCYHBH4kpS3nwPiJwXC7v+rB\nyVU30j4nAdsnp7V4rdt4mLgShWskEJ55kgyoEDwuyKvD/hGg33Pjjs/YsXbj\nIobC8hze6V83SQlCZum552OJWX2b0dCeFzjbxwPUV04lSrfKdNN4kx3nyaxQ\n/ubeSJ2wSwe/g39B7qrxSCXhcZ/XNQeqQ1VYFQWjkIp4QSIfSkuuFVTESQq5\n2Wy/0mnMBHDOhSPz62jtUVR/QB18myqRsH/ZUr9rVdLtFQgPluQgwHPQn23G\nKpTj82ZjweHrzfemn+JOIDepG3LTjrKGYdwHpKQZHMmqLZxKq7uyKuAIRU7l\no0HPFrRDywEOiVKPjZU3BMxgec2uSZv4ajACJmwwtrAAHUxC2ltxCBgGO4jT\nHv/Qn+6GVcgF0X7OohycnrMrFJTt9i76i4dKeRlo0UCUpYDvQj3SXsqj19Ya\nIKgL\r\n=T2zw\r\n-----END PGP SIGNATURE-----\r\n","size":9261,"noattachment":false,"key":"/badgen/-/badgen-2.4.2.tgz"},"main":"lib/index.js","gitHead":"623373843910d32768e78c78662e999906fba02f","scripts":{"lint":"standard","test":"tap test/*.spec.js --reporter spec --coverage","bench":"node bench/index.js","pretest":"npm run lint","preview":"node preview/serve.js","snaptests":"TAP_SNAPSHOT=1 npm test"},"_npmUser":{"name":"amio","email":"amio.cn@gmail.com"},"repository":{"url":"git+https://github.com/amio/badgen.git","type":"git"},"_npmVersion":"6.4.0","description":"Fast svg badge generator.","directories":{},"_nodeVersion":"10.9.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.0.1","standard":"^11.0.1","benchmark":"^2.1.4","serve-marked":"0.3.3"},"_npmOperationalInternal":{"tmp":"tmp/badgen_2.4.2_1535180829084_0.873199257307085","host":"s3://npm-registry-packages"},"readme":"# badgen\n\n[![npm version][npm-src]][npm-href]\n[![Coverage Status][coveralls-src]][coveralls-href]\n[![Bundle size][bundlephobia-src]][bundlephobia-href]\n[![License][license-src]][license-href]\n\nFast handcraft svg badge generator. Used on [badgen.net](https://badgen.net).\n\n- 🌀 Zero dependency\n- ⚡️ Fast by design (see [benchmarks](#benchmarks))\n- 👯‍ Running in node & browser\n\n## Usage\n\n`npm install badgen`\n\n```javascript\nconst { badgen } = require('badgen')\n\n// only `status` is required.\nconst svgString = badgen({\n  label: 'npm',      // <Text>\n  labelColor: 'ADF', // <Color RGB> or <Color Name> (default: '555')\n  status: 'v1.2.3',  // <Text>, required\n  color: 'blue',     // <Color RGB> or <Color Name> (default: 'blue')\n  style: 'flat',     // 'flat' or 'classic' (default: 'classic')\n  icon: 'data:image/svg+xml;base64,...', // Use icon (default: undefined)\n  iconWidth: 13,     // Set this if icon is not square (default: 13)\n  scale: 1           // Set badge scale (default: 1)\n})\n```\n\n```javascript\nimport { badgen } from 'badgen'\n```\n\nAvailable color names:\n\n![](https://badgen.net/badge/color/blue/blue)\n![](https://badgen.net/badge/color/cyan/cyan)\n![](https://badgen.net/badge/color/green/green)\n![](https://badgen.net/badge/color/yellow/yellow)\n![](https://badgen.net/badge/color/orange/orange)\n![](https://badgen.net/badge/color/red/red)\n![](https://badgen.net/badge/color/pink/pink)\n![](https://badgen.net/badge/color/purple/purple)\n![](https://badgen.net/badge/color/grey/grey)\n![](https://badgen.net/badge/color/black/black)\n\n### In browser\n\n```html\n<script src=\"https://unpkg.com/badgen\"></script>\n<script>\n  var svgString = badgen({ /*...*/ })\n</script>\n```\n\n## Benchmarks\n\n`npm run bench` on iMac 5K (Late 2014), 3.5G i5, with Node.js 12.11.0:\n\n```bash\n[classic] style, long params x 985,898 ops/sec ±0.37% (94 runs sampled)\n[classic] style, full params x 1,284,886 ops/sec ±0.42% (95 runs sampled)\n[classic] style, with emoji  x 1,291,768 ops/sec ±0.28% (95 runs sampled)\n[classic] style, with icon   x 1,177,120 ops/sec ±0.94% (95 runs sampled)\n   [flat] style, long params x 780,504 ops/sec ±0.39% (94 runs sampled)\n   [flat] style, full params x 1,012,111 ops/sec ±0.40% (97 runs sampled)\n   [flat] style, with emoji  x 1,013,695 ops/sec ±0.91% (95 runs sampled)\n   [flat] style, with icon   x 994,481 ops/sec ±0.30% (94 runs sampled)\n```\n\n## Development\n\n- `npm test` builds `dist/` and runs the suite with Node's native test runner.\n- `npm run snaptests` updates the checked-in snapshots.\n- `npm run preview` starts the Vite preview app with live reload at `http://localhost:5173/`.\n\n## See Also\n\n- [gradient-badge][gradient-badge] - Badge generator with color gradient support\n\n[npm-src]: https://badgen.net/npm/v/badgen\n[npm-href]: https://www.npmjs.com/package/badgen\n[bundlephobia-src]: https://badgen.net/bundlephobia/minzip/badgen\n[bundlephobia-href]: https://bundlephobia.com/result?p=badgen\n[coveralls-src]: https://badgen.net/coveralls/c/github/amio/badgen/master\n[coveralls-href]: https://coveralls.io/github/amio/badgen?branch=master\n[license-src]: https://badgen.net/github/license/amio/badgen\n[license-href]: LICENSE.md\n[gradient-badge]: https://github.com/bokub/gradient-badge\n","publish_time":1535180829304,"_cnpm_publish_time":1535180829304,"dist-tags":{"latest":"3.3.2"}}