
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Create a svg-screenshot-style svg image from dataURI image.
By including accurate xmlns
, viewBox
, etc., svg images can be show with <img>
elements. You can also embed external links in svg. When svg displayed with <object>
or <iframe>
elements, embedded anchors are clickable.
$ npm install img-svgize
Create a svg element's outerText, i.e. <svg>...</svg>
.
const svg = createSvg(dataURI, options)
interface External {
url: string,
x: number,
y: number,
width: number,
height: number,
text?: string,
className?: string,
type?: "a" | "img" // default is "a"
}
interface Options {
width: number,
height: number,
className?: string,
dataset?: { [s: string]: string },
style?: Array<string>, // [<style>...<style>, ...]
externals?: Array<External>
}
// ./demo/demo0.js
const image = new Buffer(fs.readFileSync('./demo/demo0.png')).toString('base64')
const svg = createSvg(`data:image/png;base64,${image}`, {width: 44, height: 44})
Generate a SVG Screenshot image.
$ node ./demo/demo1.js > res/demo1.svg
Open in the new browser tab, you can click anchor links in the svg image.
FAQs
Create a svg-screenshot-style svg from dataURI image
The npm package img-svgize receives a total of 1 weekly downloads. As such, img-svgize popularity was classified as not popular.
We found that img-svgize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.