R/token.R

Defines functions token.character token.xml_node token

token <- function(x) {
  UseMethod("token")
}

token.xml_node <- function(x) {
  token(xml2::xml_name(x))
}

token.character <- function(x) {
  gsub("[^a-z]", "_", tolower(x))
}
dgkf/reflow documentation built on Dec. 19, 2021, 11:05 p.m.