MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / injectGlobal

Function injectGlobal

code/styling/public/app.js:21826–21835  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21824//
21825var _injectGlobal = (function (stringifyRules, css) {
21826 var injectGlobal = function injectGlobal() {
21827 var styleSheet = StyleSheet.master;
21828 var rules = css.apply(undefined, arguments);
21829 var hash = murmurhash(JSON.stringify(rules));
21830 var id = 'sc-global-' + hash;
21831
21832 if (!styleSheet.hasId(id)) {
21833 styleSheet.inject(id, stringifyRules(rules));
21834 }
21835 };
21836
21837 return injectGlobal;
21838});

Callers

nothing calls this directly

Calls 2

murmurhashFunction · 0.85
stringifyRulesFunction · 0.85

Tested by

no test coverage detected