
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
@impactdk/svg
Advanced tools
This package is a compilation of different tools to transform SVGs including a binary to convert a folder into inline SVGs in TypeScript.
Example folder structure:
Transform all svgs inside the icons folder with this command:
transform-svg ./icons ./generated.ts
Optional watch flag to watch folder continuously for changes:
transform-svg ./icons ./generated.ts --watch
Optional path to SVGO config
transform-svg ./icons ./generated.ts --svgo='./svgo-config.json'
Config json file follows SVGO config standard:
[
    { "removeXMLNS": true },
    { "removeViewBox": false },
    { "removeDimensions": true }
]
Example contents of the outputted file generated.ts:
export const facebook =
    '<svg #facebook class="svg-facebook svg-icon" viewBox="0 0 50 50"><circle fill="#FED00F" cx="25" cy="25" r="25"/><path fill="#33363B" d="M29 15h3.5c.3 0 .5-.2.5-.5v-4c0-.3-.2-.5-.5-.5h-4c-3.7 0-6.5 2.8-6.5 6.5V21h-4.5c-.3 0-.5.2-.5.5v4c0 .3.2.5.5.5H22v13.5c0 .3.2.5.5.5h4c.3 0 .5-.2.5-.5V26h4.5c.2 0 .4-.2.5-.4l1-4c0-.1 0-.3-.1-.4-.1-.1-.2-.2-.4-.2H27v-4c0-1.1.9-2 2-2z"/></svg>';
export const thisIsASubfolderYoutube =
    '<svg #thisIsASubfolderYoutube class="svg-this-is-a-subfolder-youtube svg-icon" viewBox="0 0 32 32"><path fill="#444" d="M31.7 9.6s-.3-2.2-1.3-3.2c-1.2-1.3-2.6-1.3-3.2-1.4-4.5-.3-11.2-.3-11.2-.3s-6.7 0-11.2.3c-.6.1-2 .1-3.2 1.4C.6 7.4.3 9.6.3 9.6S0 12.2 0 14.8v2.4c0 2.6.3 5.2.3 5.2s.3 2.2 1.3 3.2c1.2 1.3 2.8 1.2 3.5 1.4 2.6.2 10.9.3 10.9.3s6.7 0 11.2-.3c.6-.1 2-.1 3.2-1.4 1-1 1.3-3.2 1.3-3.2s.3-2.6.3-5.2v-2.4c0-2.6-.3-5.2-.3-5.2zm-19 10.6v-9l8.6 4.5-8.6 4.5z"/></svg>';
FAQs
Optimize and transform SVGs to inline consts in JavaScript/TypeScript file
We found that @impactdk/svg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.