nl_tokens: Checks to see if an object is of type constructor name . Note : If passing in constructors as your type to check ensure they are * named constructors as the name property is checked directly on them to use in the class / constructor - name comparison . * named constructors - Not anonymous functions / constructors but ones having a name : E . g . ( function Hello () {} ) // Named function . ( function () {} ) // Anonymous function .
pl_tokens: function classOfIs ( obj , type ) { var classOfType = classOf ( type ) , typeIsFunction = type instanceof Function ; if ( classOfType !== String . name && ! typeIsFunction ) { throw new TypeError ( 'sjl.classOfIs expects it\'s `type` parameter to' + 'be of type `String` or an instance of `Function`.  Type received: ' + classOfType + '.' ) ; } return ( typeIsFunction ? obj instanceof type : false ) || classOf ( obj ) === ( classOfType === _String ? type : type . <mask> ) ; }