text: import { BEM } from "../utils"
  
  export default function (className, page, attrs, tag)
  {
      if (!className)
          return
  
      const isModifier = BEM.isModifier(className)
      const node = isModifier ? BEM.delModifier(className) : className
  
      if (!page.nodes[node])
          page.nodes[node] = {
              name: node,
              mod: [],
              attrs,
              tag
          }
  
      if (isModifier)
      {
          if (page.nodes[node].mod.indexOf(className) === -1)
              page.nodes[node].mod.push(className)
      }
  }