phadej / typify

Runtime type checking for JavaScript
BSD 3-Clause "New" or "Revised" License
76 stars 7 forks source link

Shortcut type definition method for constructor.name check #37

Open phadej opened 10 years ago

phadej commented 10 years ago
typify.type("foo", function (val) {
    return val.constructor.name === foo.name;
});