Skip to content
Browse files

Check function for non primary types

  • Loading branch information...
1 parent ec03e0d commit ccc417316ebed46cd03caa53de810969a46ea498 @thiagogjt thiagogjt committed Apr 25, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 argspec.js
View
7 argspec.js
@@ -73,4 +73,11 @@ var argspec = {};
return obj && obj.apply;
};
}
+
+ argspec.isTypeof = function(type) {
+ return function(obj) {
+ return obj.constructor.name === type;
+ };
+ }
+
}());

0 comments on commit ccc4173

Please sign in to comment.
Something went wrong with that request. Please try again.