index.js 360B

1234567891011121314
  1. /*!
  2. * is-primitive <https://github.com/jonschlinkert/is-primitive>
  3. *
  4. * Copyright (c) 2014-2015, Jon Schlinkert.
  5. * Licensed under the MIT License.
  6. */
  7. 'use strict';
  8. // see http://jsperf.com/testing-value-is-primitive/7
  9. module.exports = function isPrimitive(value) {
  10. return value == null || (typeof value !== 'function' && typeof value !== 'object');
  11. };