{"name":"badgen","version":"2.3.0","author":{"name":"Amio","email":"amio.cn@gmail.com"},"license":"ISC","_id":"badgen@2.3.0","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":"96ee6dabd1ceba7447a0df6cb3e14285d124ca85","tarball":"http://registry-npm.ywwl.com/badgen/download/badgen-2.3.0.tgz","fileCount":7,"integrity":"sha512-o96VpLAnMXOYySl+OMmtOg5zB5v2FposhNxTGz+9SSiT0ZdER7KWttKl9B8Q7KZ/yAVXnZXop8WzJIAqpqNwMw==","signatures":[{"sig":"MEQCIHZQTab/ghXgjwhjKAvf3dlPFCz0KBkzwg43rcilVfXuAiAJA8WIZ0nxehubnthoYmuog7oIXFxk2rJPQ5pyiVbtdw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfRXbCRA9TVsSAnZWagAA60IP/A0jIUiFQ2s0fSfByjvF\nLtGLTyxqLP2owN6TN+Q/chEKeggxG29D6MQnNCZum773j9WGRlOlHrY9ksH7\nuEUVbGgS+9mNUsIW212iHXiCQO+/EEjuEnXufg+ePaV20zGkvhvMhqX6fDHw\n/sdyPPyt/E4twHBxKnDvnZH9GsIJ/aBwP3Qby8pQOReTpiAfDtuyRdrmoIK7\nrPC/vEsDCETpRm33hjsNSQUAxeJnPUN4ct1BxaxYRGaQkJ8E0s72S3bj3zAr\n52qqcLe1OLNmFt1/cnItIQAB9wT/6MW7RPhPjWtDTdpN3OKUZUi9gkuJAP7l\nTfi3Xn9lvsmqCAZk8TBe8lwLZSsH+0Fzn/LkXmDPMyKW5U7l5Who1Mz48bnI\nBq0Ata+nB59jxFSpZxQomJDz8IY/lsWKWVbWTFvzgRIYSKw192UleC3OKm7n\nETwgpOTn6j0nP8yxreU2Lmx6AoNkyeGzsc1dBdqP7gbZkQo3BccTJK3QnjOd\nkJqiuH2jeQtXc+5VcK/ijtpaCgg2yMmZe2nHi1AWpgn5hULXgbWDMeR+5U1r\nWn+6iHhaJe9DvAhmybpBKPpFPb4dUUA0jRZeKk5/hh9cA16O7TVPgoIhA5//\n8CCpTGKcXctASHUftLl5f1l0imoEl4/rc9h+ce2I+by4KaC5+HYw42P2XkPf\n/U5A\r\n=KDmW\r\n-----END PGP SIGNATURE-----\r\n","size":3428,"noattachment":false,"key":"/badgen/-/badgen-2.3.0.tgz"},"main":"lib/index.js","gitHead":"709a08182d5aa32d1db431a0c34d38aa44cbd50d","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":{"unicode-astral-regex":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.0.1","standard":"^11.0.1","benchmark":"^2.1.4","serve-marked":"0.3.2"},"_npmOperationalInternal":{"tmp":"tmp/badgen_2.3.0_1534924251256_0.09694350221280845","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":1534924251351,"_cnpm_publish_time":1534924251351,"dist-tags":{"latest":"3.3.2"}}