{"_id":"@rpl/badge-up","_rev":"3340209","name":"@rpl/badge-up","description":"A module that produces hot badges without the need of Cairo","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"rpl","email":""}],"time":{"modified":"2024-07-10T08:26:42.000Z","created":"2018-12-15T16:56:31.931Z","3.0.0":"2021-11-07T19:35:36.879Z","2.2.0":"2018-12-15T16:56:31.931Z"},"users":{},"author":{"name":"St. John Johnson","email":"stjohn@yahoo-inc.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/rpl/badge-up.git"},"versions":{"3.0.0":{"name":"@rpl/badge-up","version":"3.0.0","description":"A module that produces hot badges without the need of Cairo","main":"index.js","nyc":{"reporter":["lcov","text"]},"scripts":{"lint":"eslint .","test":"nyc --report-dir ./artifacts/coverage mocha --color true","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"git+ssh://git@github.com/rpl/badge-up.git"},"homepage":"https://github.com/rpl/badge-up","engines":{"node":">=10.0.0"},"bugs":{"url":"https://github.com/rpl/badge-up/issues"},"keywords":["badge","yahoo"],"license":"BSD-3-Clause","author":{"name":"St. John Johnson","email":"stjohn@yahoo-inc.com"},"contributors":[{"name":"Darren Matsumoto","email":"bobafett@yahoo-inc.com"},{"name":"Drew Folta","email":"folta@yahoo-inc.com"},{"name":"Noah Katzman","email":"nkatzman@yahoo-inc.com"},{"name":"Peter Peterson","email":"petey@yahoo-inc.com"},{"name":"Robert Ames","email":"rames@yahoo-inc.com"}],"release":{"debug":false,"verifyConditions":{"path":"./node_modules/semantic-release/src/lib/plugin-noop.js"}},"devDependencies":{"chai":"^4.2.0","coveralls":"^3.0.11","eslint":"^6.8.0","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^9.0.1"},"dependencies":{"css-color-names":"~1.0.1","dot":"^1.1.3","svgo":"2.6.0"},"gitHead":"ed42cf9ef3612fd81f55c92b67f91660d68eeb8b","_id":"@rpl/badge-up@3.0.0","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"shasum":"d2fa1d79b02f2eebfce02e593fc027b168499da5","size":6614,"noattachment":false,"key":"/@rpl/badge-up/-/@rpl/badge-up-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rpl/badge-up/download/@rpl/badge-up-3.0.0.tgz"},"_npmUser":{"name":"rpl","email":"lgreco@mozilla.com"},"directories":{},"maintainers":[{"name":"rpl","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/badge-up_3.0.0_1636313736713_0.5745963029516765"},"_hasShrinkwrap":false,"publish_time":1636313736879,"_cnpm_publish_time":1636313736879,"_cnpmcore_publish_time":"2021-12-17T00:50:27.560Z"},"2.2.0":{"name":"@rpl/badge-up","version":"2.2.0","description":"A module that produces hot badges without the need of Cairo (forked from the original badge-up package to update vulnerable npm deps)","main":"index.js","scripts":{"lint":"jshint *.js test/*.js","test":"jenkins-mocha"},"repository":{"type":"git","url":"git+ssh://git@github.com/rpl/badge-up.git"},"bugs":{"url":"https://github.com/yahoo/badge-up/issues"},"keywords":["badge"],"license":"BSD-3-Clause","author":{"name":"St. John Johnson","email":"stjohn@yahoo-inc.com"},"contributors":[{"name":"Darren Matsumoto","email":"bobafett@yahoo-inc.com"},{"name":"Drew Folta","email":"folta@yahoo-inc.com"},{"name":"Noah Katzman","email":"nkatzman@yahoo-inc.com"},{"name":"Peter Peterson","email":"petey@yahoo-inc.com"},{"name":"Robert Ames","email":"rames@yahoo-inc.com"}],"jshintConfig":{"node":true},"devDependencies":{"chai":"^3.5.0","coveralls":"^3.0.2","jenkins-mocha":"^6.0.0","jshint":"^2.9.2","sinon":"^1.17.7"},"dependencies":{"css-color-names":"~0.0.3","dot":"^1.1.1","svgo":"^1.1.1"},"gitHead":"ad6b562dfd1ad51027e737bf32b478921964df78","homepage":"https://github.com/rpl/badge-up#readme","_id":"@rpl/badge-up@2.2.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"rpl","email":"lgreco@mozilla.com"},"dist":{"shasum":"79a5ccf72bdb1777390bb7e4caa08dc42d57dd9a","size":5799,"noattachment":false,"key":"/@rpl/badge-up/-/@rpl/badge-up-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rpl/badge-up/download/@rpl/badge-up-2.2.0.tgz"},"maintainers":[{"name":"rpl","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/badge-up_2.2.0_1544892991753_0.37501088637039737"},"_hasShrinkwrap":false,"publish_time":1544892991931,"_cnpm_publish_time":1544892991931,"_cnpmcore_publish_time":"2021-12-17T00:50:27.868Z"}},"readme":"# badge-up\n\n[![npm](https://img.shields.io/npm/v/badge-up.svg?maxAge=2592000)](https://www.npmjs.com/package/badge-up)\n[![downloads](https://img.shields.io/npm/dt/badge-up.svg?maxAge=2592000)](https://www.npmjs.com/package/badge-up)\n[![build](https://cd.screwdriver.cd/pipelines/62/badge?maxAge=2592000)](https://cd.screwdriver.cd/pipelines/62)\n[![coverage](https://coveralls.io/repos/github/yahoo/badge-up/badge.svg)](https://coveralls.io/github/yahoo/badge-up)\n\nThis is a simple library that generates SVG badges without Cairo.\n\n\n## Install\n\n`npm install badge-up`\n\n\n## V1 Usage\n\n```js\nconst badge = require('badge-up');\nbadge('batman', 'component', badge.colors.green, function (error, svg) {\n    // some callback\n});\n```\n\nProduces: ![example](https://cdn.rawgit.com/yahoo/badge-up/master/test/testData/good.svg)\n\nThe color argument can be a CSS color, or one of the specially named colors\nfound in `badge.colors`.\n\nYou can alternatively use the returned `Promise`:\n\n```js\nconst badge = require('badge-up');\n(async () => {\ntry {\n    const svg = await badge('batman', 'component', badge.colors.green);\n} catch (error) {\n    //\n}\n}());\n```\n\n## V2 Usage\n\nWith this API you can create arbitrary badges with an arbitrary number of sections.\n\nEach section is an array. The first element is the text to show, and the rest\nof the (optional) elements are attributes to apply to the text. If there are no\nattributes then a single string (instead of an array of one element) can be\npassed instead.\n\nThe following attributes are supported:\n\n* `{hex}{hex}{hex}{hex}{hex}{hex}` six hexadecimal characters or `{css-color-name}` a named CSS color,\n    either of which is used to color the section\n* `s{{hex}{hex}{hex}{hex}{hex}{hex}}` six hexadecimal characters or `s{css-color-name}` a named CSS color,\n    either of which is used to color stroke the section, e.g. `s{d3d3d3}`\n\nThe default color for the first section is `696969` and `d3d3d3` for subsequent sections.\n\nAny section can have mulitple lines by putting newlines in its text.\n\n```js\nconst badge = require('badge-up');\nconst sections = [\n    'foo/far;fun',\n    [ 'bar\\nbaz', 'orange'],\n    [ 'mork \"mindy\"', 'olive', 's{white}'],\n    [ '<∀>', 'moccasin']\n];\nbadge.v2(sections, function (error, svg) {\n    // some callback\n});\n```\n\nProduces: ![example](https://cdn.rawgit.com/yahoo/badge-up/master/test/testData/v2-example.svg)\n\nYou can also use the returned `Promise`:\n\n```js\nconst badge = require('badge-up');\nconst sections = [\n    'foo/far;fun',\n    [ 'bar\\nbaz', 'orange'],\n    [ 'mork \"mindy\"', 'olive', 's{white}'],\n    [ '<∀>', 'moccasin']\n];\n\n(async () => {\ntry {\n    const svg = await badge.v2(sections);\n} catch (error) {\n  //\n}\n}());\n```\n","_attachments":{},"homepage":"https://github.com/rpl/badge-up","bugs":{"url":"https://github.com/rpl/badge-up/issues"},"license":"BSD-3-Clause"}