function getPluginsOrPresetsFromScript(script, attributeName) {
  const rawValue = script.getAttribute(attributeName);
  if (rawValue === "") {
    // Empty string means to not load ANY presets or plugins
    return [];
  }
  if (!rawValue) {
    // Any other falsy value (null, undefined) means we're not overriding this
    // setting, and should use the default.
    return null;
  }
  return rawValue.split(",").map(item => item.trim());
}
function getPluginsOrPresetsFromScript(script, attributeName) {
  const rawValue = script.getAttribute(attributeName);
  if (rawValue === "") {
    // Empty string means to not load ANY presets or plugins
    return [];
  }
  if (!rawValue) {
    // Any other falsy value (null, undefined) means we're not overriding this
    // setting, and should use the default.
    return null;
  }
  return rawValue.split(",").map(item => item.trim());
}
function getPluginsOrPresetsFromScript ( script , attributeName ) { const rawValue = script . getAttribute ( attributeName ) ; if ( rawValue === "" ) { // Empty string means to not load ANY presets or plugins return [ ] ; } if ( ! rawValue ) { // Any other falsy value (null, undefined) means we're not overriding this // setting, and should use the default. return null ; } return rawValue . split ( "," ) . map ( item => item . trim ( ) ) ; }
Converts a comma-separated data attribute string into an array of values. If
the string is empty, returns an empty array. If the string is not defined,
returns null.
Converts a comma - separated data attribute string into an array of values . If the string is empty returns an empty array . If the string is not defined returns null .
Get the plugins or presets from a script attribute