How to use the skatejs/dist/esnext/util.dashCase function in skatejs

To help you get started, we’ve selected a few skatejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pattern-lab / patternlab-node / packages / uikit-base / preact-component / base-skate-element.js View on Github external
export function normalizeAttributeDefinition(name, prop) {
  const { attribute } = prop;
  const obj =
    typeof attribute === 'object'
      ? _extends({}, attribute)
      : {
          source: attribute,
          target: attribute,
        };
  if (obj.source === true) {
    obj.source = dashCase(name);
  }
  if (obj.target === true) {
    obj.target = dashCase(name);
  }
  return obj;
}
github pattern-lab / patternlab-node / packages / uikit-base / preact-component / base-skate-element.js View on Github external
export function normalizeAttributeDefinition(name, prop) {
  const { attribute } = prop;
  const obj =
    typeof attribute === 'object'
      ? _extends({}, attribute)
      : {
          source: attribute,
          target: attribute,
        };
  if (obj.source === true) {
    obj.source = dashCase(name);
  }
  if (obj.target === true) {
    obj.target = dashCase(name);
  }
  return obj;
}