lib/identifiers.js
function format(identifier) {
  if(typeof identifier === 'string') {
    var hexIdentifier = identifier.replace(/[^A-Fa-f0-9]/g, '');
    return hexIdentifier.toLowerCase();
  }
  return null;
}
function format(identifier) {
  if(typeof identifier === 'string') {
    var hexIdentifier = identifier.replace(/[^A-Fa-f0-9]/g, '');
    return hexIdentifier.toLowerCase();
  }
  return null;
}
function format ( identifier ) { if ( typeof identifier === 'string' ) { var hexIdentifier = identifier . replace ( / [^A-Fa-f0-9] / g , '' ) ; return hexIdentifier . toLowerCase ( ) ; } return null ; }
Convert the given identifier to a valid identifier string, if possible.
@param {String} identifier The given identifier.
@return {String} Valid identifier string, or null if invalid input.
Convert the given identifier to a valid identifier string if possible .