Created
March 22, 2018 11:43
-
-
Save KhalilZaidoun/fa34e11a25892bf9f6bafa3562759ade to your computer and use it in GitHub Desktop.
Verify element is a SVG element
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const elements = [ | |
'animate', | |
'circle', | |
'defs', | |
'ellipse', | |
'g', | |
'line', | |
'linearGradient', | |
'mask', | |
'path', | |
'pattern', | |
'polygon', | |
'polyline', | |
'radialGradient', | |
'rect', | |
'stop', | |
'svg', | |
'text', | |
'tspan', | |
] | |
export default name => elements.indexOf(name) !== -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment