Turns an SVG path into an array of its shapes.
Older browsers might require a polyfill for String.prototype.trim.
$ npm install svg-path-shapes
var shapes = require('svg-path-shapes') shapes('M30 10 L35 15 M40 20 L45 25')// => ['M30 10 L35 15', 'M40 20 L45 25']
Learn best practices for Node.js with Visual Studio and Windows, including how and why to use npm packages and modules. Watch today »
how? learn more