Skip to content

Instantly share code, notes, and snippets.

@KhalilZaidoun
Created March 22, 2018 11:43
Show Gist options
  • Save KhalilZaidoun/fa34e11a25892bf9f6bafa3562759ade to your computer and use it in GitHub Desktop.
Save KhalilZaidoun/fa34e11a25892bf9f6bafa3562759ade to your computer and use it in GitHub Desktop.
Verify element is a SVG element
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