{"library":"parse-svg-path","title":"Minimal SVG Path Parser","description":"parse-svg-path is a highly minimal JavaScript library designed to parse SVG path data strings into a simple array-of-arrays format. Published in 2014, with its last update 10 years ago, it remains at version 0.1.2, indicating it is no longer actively maintained. Its primary differentiator is its simplicity and small footprint, directly outputting commands as `[command, arg1, arg2, ...]`. While functional for basic SVG paths, it lacks features found in more modern and actively developed alternatives like `svg-path-parser` or `svgpath`, which offer more advanced manipulation, normalization, or broader SVG feature support. Due to its age, it primarily supports CommonJS modules and does not offer native ESM support.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install parse-svg-path"],"cli":null},"imports":["const parse = require('parse-svg-path')","import parse from 'parse-svg-path'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const parse = require('parse-svg-path');\n\nconst svgPathData = 'M10 10 L100 10 L50 90 Z';\nconst parsedCommands = parse(svgPathData);\n\nconsole.log('Original SVG Path Data:', svgPathData);\nconsole.log('Parsed Commands:', JSON.stringify(parsedCommands, null, 2));\n\n// Example with relative commands and shorthand\nconst complexPathData = 'm1 2 3 4 C10 20 30 40 50 60 s70 80 90 100';\nconst parsedComplexCommands = parse(complexPathData);\nconsole.log('\\nComplex SVG Path Data:', complexPathData);\nconsole.log('Parsed Complex Commands:', JSON.stringify(parsedComplexCommands, null, 2));\n\n/*\nExpected output:\nOriginal SVG Path Data: M10 10 L100 10 L50 90 Z\nParsed Commands: [\n  [\"M\",10,10],\n  [\"L\",100,10],\n  [\"L\",50,90],\n  [\"Z\"]\n]\n\nComplex SVG Path Data: m1 2 3 4 C10 20 30 40 50 60 s70 80 90 100\nParsed Complex Commands: [\n  [\"m\",1,2],\n  [\"l\",3,4],\n  [\"C\",10,20,30,40,50,60],\n  [\"s\",70,80,90,100]\n]\n*/","lang":"javascript","description":"Demonstrates how to import and use the `parse` function to convert an SVG path string into an array of command arrays, including basic and complex paths.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}