parse-svg-path
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -16,3 +16,3 @@ | ||
var segment = /([a-z])\s*((-?\d*\.?\d*(?:e[\-+]?\d+)?\s*,?\s*)+)/ig | ||
var segment = /([astvzqmhlc])([^astvzqmhlc]*)/ig | ||
@@ -54,4 +54,4 @@ /** | ||
function parseValues(args){ | ||
args = args.match(/[^\s,]+/g) || [] | ||
return args.map(Number) | ||
args = args.match(/-?[.0-9]+(?:e[-+]?\d+)?/ig) | ||
return args ? args.map(Number) : [] | ||
} |
{ | ||
"name": "parse-svg-path", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "svg path parser", | ||
@@ -5,0 +5,0 @@ "keywords": ["svg","path","parse","parser"], |
# parse-svg-path | ||
A minimal svg path parser. For the delux model see [hughsk/svg-path-parser](https://github.com/hughsk/svg-path-parser). | ||
A minimal svg path parser. For the delux model see [hughsk/svg-path-parser](//github.com/hughsk/svg-path-parser) or for the streaming model see [nfroidure/SVGPathData](//github.com/nfroidure/SVGPathData). | ||
## Installation | ||
_With [packin](//github.com/jkroso/packin) or [component](//github.com/component/component)_ | ||
- [packin](//github.com/jkroso/packin): `packin add jkroso/parse-svg-path` | ||
- [component](//github.com/component/component#installing-packages): `component install jkroso/parse-svg-path` | ||
- [npm](//npmjs.org/doc/cli/npm-install.html): `npm install parse-svg-path` | ||
$ packin add jkroso/parse-svg-path | ||
then in your app: | ||
@@ -13,0 +13,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2498