Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
svgstore
Combines multiple svg files into one using <symbol>
elements which you may <use>
in your markup. Heavily inspired by grunt-svgstore
and gulp-svgstore
, this is a standalone module that may be used in any asset pipeline.
$ npm install --save svgstore
var svgstore = require('svgstore');
var fs = require('fs');
var sprites = svgstore()
.add('unicorn', fs.readFileSync('./unicorn.svg', 'utf8'))
.add('rainbow', fs.readFileSync('./rainbow.svg', 'utf8'));
fs.writeFileSync('./sprites.svg', sprites.toString());
The resulting file may be consumed in markup as external content.
<body>
<svg role="img"><use xlink:href="./sprites.svg#unicorn"/></svg>
<svg role="img"><use xlink:href="./sprites.svg#rainbow"/></svg>
</body>
See the examples directory for more detail.
Creates a container svg sprites document.
The current cheerio instance.
id
String
Unique id
for this svg file.svg
String
Raw source of the svg file.Appends a file to the sprite with the given id
.
options
{Object}
inline
{Boolean}
(default: false
) Don't output <?xml ?>
and DOCTYPE
.Outputs sprite as a string of XML.
Standards for this project, including tests, code coverage, and semantics are enforced with a build tool. Pull requests must include passing tests with 100% code coverage and no linting errors.
$ npm test
© Shannon Moeller me@shannonmoeller.com (shannonmoeller.com)
Licensed under MIT
FAQs
Combines mulitple svg files into one.
The npm package svgstore receives a total of 21,464 weekly downloads. As such, svgstore popularity was classified as popular.
We found that svgstore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.