isObject.js 299 B

12345678910111213141516
  1. 'use strict';
  2. /*!
  3. * Determines if `arg` is an object.
  4. *
  5. * @param {Object|Array|String|Function|RegExp|any} arg
  6. * @api private
  7. * @return {Boolean}
  8. */
  9. module.exports = function(arg) {
  10. return (
  11. Buffer.isBuffer(arg) ||
  12. Object.prototype.toString.call(arg) === '[object Object]'
  13. );
  14. };