nl_tokens: Throws an error if passed in value is empty ( 0 null undefined false empty {} or empty [] ) .
pl_tokens: function throwTypeErrorIfEmptyOrNotOfType ( prefix , paramName , value , type , suffix ) { var classOfValue = classOf ( value ) , issetType = isset ( type ) ; // If `type` itself is not of the allowed types throw an error if ( issetType && ! isString ( type ) && ! isFunction ( type ) ) { throw new TypeError ( '`sjl.throwTypeErrorIfEmptyOrNotOfType.type` only accepts strings, functions (constructors),' + 'null, or undefined.  ' + 'Type received: `' + classOf ( type ) + '`.' ) ; } // Proceed with type check if ( issetType && ! classOfIs ( value , type ) ) { throw new TypeError ( '#`' + <mask> + '`.`' + paramName + '` is not of type "' + type + '".  ' + ( suffix || '' ) + '  Type received: `' + classOfValue + '`.' ) ; } // Proceed with empty check if ( isEmpty ( value ) ) { throw new TypeError ( '#`' + prefix + '`.`' + paramName + '` Cannot be empty.  ' + ( suffix || '' ) + '  Value received: `' + value + '`.  ' + '  Type received: ' + classOfValue + '`.' ) ; } }