index.js
function language(node) {
  var className = node.properties.className || []
  var length = className.length
  var index = -1
  var value

  while (++index < length) {
    value = className[index]

    if (value === 'no-highlight' || value === 'nohighlight') {
      return false
    }

    if (value.slice(0, 5) === 'lang-') {
      return value.slice(5)
    }

    if (value.slice(0, 9) === 'language-') {
      return value.slice(9)
    }
  }

  return null
}
function language(node) {
  var className = node.properties.className || []
  var length = className.length
  var index = -1
  var value

  while (++index < length) {
    value = className[index]

    if (value === 'no-highlight' || value === 'nohighlight') {
      return false
    }

    if (value.slice(0, 5) === 'lang-') {
      return value.slice(5)
    }

    if (value.slice(0, 9) === 'language-') {
      return value.slice(9)
    }
  }

  return null
}
function language ( node ) { var className = node . properties . className || [ ] var length = className . length var index = - 1 var value while ( ++ index < length ) { value = className [ index ] if ( value === 'no-highlight' || value === 'nohighlight' ) { return false } if ( value . slice ( 0 , 5 ) === 'lang-' ) { return value . slice ( 5 ) } if ( value . slice ( 0 , 9 ) === 'language-' ) { return value . slice ( 9 ) } } return null }
Get the programming language of `node`.
Get the programming language of node .