Skip to content

Instantly share code, notes, and snippets.

@ImaginaryDevelopment
ImaginaryDevelopment / maybe_without_objects.js
Last active December 21, 2015 21:39 — forked from timcharper/maybe_without_objects.js
maybe_without_objects adjusted for prototype calls and what not, in action at http://jsfiddle.net/Maslow/w8Uzw/
function type(obj) {
var obj_type = typeof obj;
return ({
is: function (type) {
return obj_type === type;
},
is_object: function () {
return obj_type === "object";
},
is_func: function () {