isObject.js 203 B

1234567891011
  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. });