How to use the emotion-utils.forEach 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 / next / packages / server / src / index.js View on Github external
ids[match[1]] = true
    }
  }

  o.rules = sheet.sheet.cssRules.slice().filter(x => {
    RGX.lastIndex = 0
    let match = RGX.exec(x.cssText)
    const ret = match == null || ids[match[1]] || false
    return ret
  })

  o.ids = keys(inserted).filter(id => {
    return !!ids[id] || !registered[`css-${id}`]
  })
  let css = ''
  forEach(o.rules, x => (css += x.cssText))
  o.css = css

  return o
}

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