is-svg-path
Version:
Detect if string an SVG path
16 lines (10 loc) • 542 B
Markdown
# is-svg-path [](https://travis-ci.org/dfcreative/is-svg-path)
Test if a string is an SVG path.
[](https://npmjs.org/package/is-svg-path/)
```js
const isPath = require('is-svg-path')
isPath('M0 0L10 20 20 0Z') //true
isPath('M00Z') //false
isPath('xyz') //false
```
It does not validate path data nor covers edge cases like `'H0'` etc., but rather detects path in real world.