isObject.js 203 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 define(function () { // Is a given variable an object? function isObject(obj) { var type = typeof obj; return type === 'function' || type === 'object' && !!obj; } return isObject; });