https://github.com/dy/is-svg-path
Check if a string is an svg path data
https://github.com/dy/is-svg-path
Last synced: 5 months ago
JSON representation
Check if a string is an svg path data
- Host: GitHub
- URL: https://github.com/dy/is-svg-path
- Owner: dy
- License: mit
- Created: 2017-07-22T00:45:31.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-07-12T21:11:33.000Z (almost 2 years ago)
- Last Synced: 2024-12-26T23:32:27.494Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# 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.