Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
parse-svg-path
Advanced tools
The parse-svg-path npm package is a utility for parsing SVG path data strings into a more manageable format. This can be useful for manipulating or analyzing SVG paths programmatically.
Parsing SVG Path Data
This feature allows you to parse an SVG path data string into an array of commands and parameters. The parsed output is easier to manipulate programmatically.
const parse = require('parse-svg-path');
const pathData = 'M10 10 H 90 V 90 H 10 Z';
const parsedPath = parse(pathData);
console.log(parsedPath);
The svg-path-parser package provides similar functionality to parse-svg-path by converting SVG path data strings into a more structured format. It also offers additional features like converting the parsed data back into a string.
The svg-pathdata package offers a comprehensive set of tools for parsing, transforming, and encoding SVG path data. It provides more advanced manipulation capabilities compared to parse-svg-path.
The path-data-parser package is another alternative for parsing SVG path data. It focuses on providing a simple and lightweight solution for converting path data strings into a structured format.
A minimal svg path parser. For the delux model see hughsk/svg-path-parser or for the streaming model see nfroidure/SVGPathData.
packin add jkroso/parse-svg-path
component install jkroso/parse-svg-path
npm install parse-svg-path
then in your app:
var parse = require('parse-svg-path')
parse an svg path data string. Generates an Array
of commands where each command is an Array of the
form [command, arg1, arg2, ...]
parse('m1 2 3 4') // => [['m',1,2],['l',3,4]]
Just run make
and navigate your browser to the test directory.
FAQs
svg path parser
The npm package parse-svg-path receives a total of 632,470 weekly downloads. As such, parse-svg-path popularity was classified as popular.
We found that parse-svg-path 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.