How to use the emotion-utils.hashArray function in emotion-utils

To help you get started, we’ve selected a few emotion-utils 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 emotion-js / emotion / packages / babel-plugin-emotion / src / inline.js View on Github external
export function inline(
  quasi: any,
  identifierName?: string,
  prefix: string
): {
  name: string,
  hash: string,
  src: string
} {
  let strs = quasi.quasis.map(x => x.value.cooked)
  let hash = hashArray([...strs])
  let name = getName(identifierName, prefix)
  let { src } = createRawStringFromQuasi(strs)

  return {
    name,
    hash,
    src
  }
}

emotion-utils

Shared utilities used by emotion, The Next Generation of CSS-in-JS.

MIT
Latest version published 7 years ago

Package Health Score

78 / 100
Full package analysis