nl_tokens: Validate the arguments that are given to catchAndMatch . Return an Error when one of these arguments is not of an expected type .
pl_tokens: function isIllegalArguments ( _ref ) { var fn = _ref . fn ; var cb = _ref . cb ; var matcher = _ref . matcher ; if ( typeof fn !== 'function' ) { return Promise . reject ( <mask> Error ( 'Expected fn to be a Function' ) ) ; } if ( typeof cb !== 'undefined' && typeof cb !== 'function' ) { return Promise . reject ( new Error ( 'Expected cb to be a Function' ) ) ; } if ( ! ( matcher instanceof RegExp ) && [ 'function' , 'string' ] . indexOf ( typeof matcher === 'undefined' ? 'undefined' : _typeof ( matcher ) ) === - 1 && matcher . constructor !== Error . constructor ) { return Promise . reject ( new Error ( UNRECOGNISED_MATCHER_ERR ) ) ; } return Promise . resolve ( ) ; }