Check if a string is SVG
npm install is-svg
import isSvg from 'is-svg';
isSvg('<svg xmlns="http://www.w3.org/2000/svg"><path fill="#00CD9F"/></svg>');
//=> true
Check if a string is SVG
Homepage Repository npm JavaScript Download
npm install is-svg@4.3.1
Check if a string is SVG
npm install is-svg
import isSvg from 'is-svg';
isSvg('<svg xmlns="http://www.w3.org/2000/svg"><path fill="#00CD9F"/></svg>');
//=> true
The maintainers of this project get paid by Tidelift to make sure it meets pre-defined standards around security, maintenance and licensing.
Want to learn more? Chat with an expert at Tidelift.
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.
Learn more →Login to resync this project