Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const _isUnsupportedAttribute = (genus, attr) => {
let key
if (BLOCK_DIRECTIVES.indexOf(genus) > -1) {
// these are all containers which share the same attributes, so they're
// grouped under a single property
key = 'block'
} else {
// this will be the directive name, e.g., figure, video, etc
key = genus
}
return SUPPORTED_ATTRIBUTES[key][attr] !== true // bool
}
const _directiveOrder = genus =>
BLOCK_DIRECTIVES.indexOf(genus) > -1
? 'block'
: INLINE_DIRECTIVES.indexOf(genus) > -1
? 'inline'
: MISC_DIRECTIVES.indexOf(genus) > -1
? 'misc'
: null