lib/index.js
function clean(method) {
  for (let m of methods) {
    if (new RegExp(m, 'i').test(method)) {
      return m;
    }
  }

  throw new Error(`Invalid method name: ${method}`);
}
function clean(method) {
  for (let m of methods) {
    if (new RegExp(m, 'i').test(method)) {
      return m;
    }
  }

  throw new Error(`Invalid method name: ${method}`);
}
function clean ( method ) { for ( let m of methods ) { if ( new RegExp ( m , 'i' ) . test ( method ) ) { return m ; } } throw new Error ( ` ${ method } ` ) ; }
Returns a clean, lower-case method name.

@param {String} method The method to check and clean.

@returns {String} The clean method name.
Returns a clean lower - case method name .