isObject.js 205 B

123456789101112
  1. define(function () {
  2. // Is a given variable an object?
  3. function isObject(obj) {
  4. var type = typeof obj;
  5. return type === 'function' || (type === 'object' && !!obj);
  6. }
  7. return isObject;
  8. });