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.

25 lines
720 B

4 years ago
  1. 'use strict';
  2. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  3. module.exports = {
  4. /**
  5. * @returns {boolean}
  6. */
  7. isArray: function isArray(item) {
  8. return Array.isArray(item);
  9. },
  10. /**
  11. * @returns {boolean}
  12. */
  13. isObject: function isObject(item) {
  14. return (typeof item === 'undefined' ? 'undefined' : _typeof(item)) === 'object' && item !== null;
  15. },
  16. /**
  17. * @returns {boolean}
  18. */
  19. isFunction: function isFunction(item) {
  20. return typeof item === 'function';
  21. }
  22. };