Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function instanceOfBuiltInType(o, type) {
- type = type.toLowerCase();
- var t = o.constructor.toString();
- if( t.length === type.length) { t = t.toLowerCase(); return type === t; }
- return t.slice(0,12 + type.length).toLowerCase() === ("function " + type + "() ");
- }
Advertisement
Add Comment
Please, Sign In to add comment