Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

is-object.js 965B

12345678910111213141516171819202122232425262728293031
  1. "use strict";
  2. /**
  3. * Returns `true` when the value is a regular Object and not a specialized Object
  4. *
  5. * This helps speed up deepEqual cyclic checks
  6. *
  7. * The premise is that only Objects are stored in the visited array.
  8. * So if this function returns false, we don't have to do the
  9. * expensive operation of searching for the value in the the array of already
  10. * visited objects
  11. *
  12. * @private
  13. * @param {object} value The object to examine
  14. * @returns {boolean} `true` when the object is a non-specialised object
  15. */
  16. function isObject(value) {
  17. return (
  18. typeof value === "object" &&
  19. value !== null &&
  20. // none of these are collection objects, so we can return false
  21. !(value instanceof Boolean) &&
  22. !(value instanceof Date) &&
  23. !(value instanceof Error) &&
  24. !(value instanceof Number) &&
  25. !(value instanceof RegExp) &&
  26. !(value instanceof String)
  27. );
  28. }
  29. module.exports = isObject;