examples/dist/common.js
function injectAndGetClassName(useImportant, styleDefinitions) {
    // Filter out falsy values from the input, to allow for
    // `css(a, test && c)`
    var validDefinitions = styleDefinitions.filter(function (def) {
        return def;
    });

    // Break if there aren't any valid styles.
    if (validDefinitions.length === 0) {
        return "";
    }

    var className = validDefinitions.map(function (s) {
        return s._name;
    }).join("-o_O-");
    injectStyleOnce(className, '.' + className, validDefinitions.map(function (d) {
        return d._definition;
    }), useImportant);

    return className;
}
function injectAndGetClassName(useImportant, styleDefinitions) {
    // Filter out falsy values from the input, to allow for
    // `css(a, test && c)`
    var validDefinitions = styleDefinitions.filter(function (def) {
        return def;
    });

    // Break if there aren't any valid styles.
    if (validDefinitions.length === 0) {
        return "";
    }

    var className = validDefinitions.map(function (s) {
        return s._name;
    }).join("-o_O-");
    injectStyleOnce(className, '.' + className, validDefinitions.map(function (d) {
        return d._definition;
    }), useImportant);

    return className;
}
function injectAndGetClassName ( useImportant , styleDefinitions ) { // Filter out falsy values from the input, to allow for // `css(a, test && c)` var validDefinitions = styleDefinitions . filter ( function ( def ) { return def ; } ) ; // Break if there aren't any valid styles. if ( validDefinitions . length === 0 ) { return "" ; } var className = validDefinitions . map ( function ( s ) { return s . _name ; } ) . join ( "-o_O-" ) ; injectStyleOnce ( className , '.' + className , validDefinitions . map ( function ( d ) { return d . _definition ; } ) , useImportant ) ; return className ; }
Inject styles associated with the passed style definition objects, and return
an associated CSS class name.

@param {boolean} useImportant If true, will append !important to generated
CSS output. e.g. {color: red} -> "color: red !important".
@param {Object[]} styleDefinitions style definition objects as returned as
properties of the return value of StyleSheet.create().
Inject styles associated with the passed style definition objects and return an associated CSS class name .