MCPcopy
hub / github.com/ampproject/worker-dom / hyphenateKey

Function hyphenateKey

src/worker-thread/css/CSSStyleDeclaration.ts:30–30  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

28}
29
30const hyphenateKey = (key: string): string => toLower(key.replace(/(webkit|ms|moz|khtml)/g, '-$1').replace(/([a-zA-Z])(?=[A-Z])/g, '$1-'));
31
32export const appendKeys = (keys: Array<string>): void => {
33 const keysToAppend = keys.filter((key) => isNaN(key as any) && !CSSStyleDeclaration.prototype.hasOwnProperty(key));

Callers 1

appendKeysFunction · 0.85

Calls 2

toLowerFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…