nl_tokens: Throws a type error if value is not of type and prepends the prefix and paramName / variable - name to the message ( removes type checking boilerplate where required ) .
pl_tokens: function throwTypeErrorIfNotOfType ( prefix , paramName , value , type , suffix ) { var classOfValue = classOf ( <mask> ) ; // If `type` itself is not of the allowed types throw an error if ( ! isString ( type ) && ! isFunction ( type ) ) { throw new TypeError ( '`sjl.throwTypeErrorIfNotOfType` only accepts strings or constructors.  ' + 'Type received: `' + classOf ( type ) + '`.' ) ; } // Proceed with type check if ( ! classOfIs ( value , type ) ) { throw new TypeError ( '#`' + prefix + '`.`' + paramName + '` is not of type "' + type + '".  ' + ( suffix || '' ) + '  Type received: `' + classOfValue + '`.' ) ; } }