dist/cssobj.amd.js
function (node, selText, cssText) {
    if(!cssText) return
    // get parent to add
    var parent = getParent(node);
    var parentRule = node.parentRule;
    if (validParent(node))
      return node.omRule = addCSSRule(parent, selText, cssText, node)
    else if (parentRule) {
      // for old IE not support @media, check mediaEnabled, add child nodes
      if (parentRule.mediaEnabled) {
        [].concat(node.omRule).forEach(removeOneRule);
        return node.omRule = addCSSRule(parent, selText, cssText, node)
      } else if (node.omRule) {
        node.omRule.forEach(removeOneRule);
        delete node.omRule;
      }
    }
  }
function (node, selText, cssText) {
    if(!cssText) return
    // get parent to add
    var parent = getParent(node);
    var parentRule = node.parentRule;
    if (validParent(node))
      return node.omRule = addCSSRule(parent, selText, cssText, node)
    else if (parentRule) {
      // for old IE not support @media, check mediaEnabled, add child nodes
      if (parentRule.mediaEnabled) {
        [].concat(node.omRule).forEach(removeOneRule);
        return node.omRule = addCSSRule(parent, selText, cssText, node)
      } else if (node.omRule) {
        node.omRule.forEach(removeOneRule);
        delete node.omRule;
      }
    }
  }
function ( node , selText , cssText ) { if ( ! cssText ) return // get parent to add var parent = getParent ( node ) ; var parentRule = node . parentRule ; if ( validParent ( node ) ) return node . omRule = addCSSRule ( parent , selText , cssText , node ) else if ( parentRule ) { // for old IE not support @media, check mediaEnabled, add child nodes if ( parentRule . mediaEnabled ) { [ ] . concat ( node . omRule ) . forEach ( removeOneRule ) ; return node . omRule = addCSSRule ( parent , selText , cssText , node ) } else if ( node . omRule ) { node . omRule . forEach ( removeOneRule ) ; delete node . omRule ; } } }
helper function for addNormalrule
helper function for addNormalrule