is-implemented.js 359 B

1234567891011
  1. 'use strict';
  2. var create = Object.create, getPrototypeOf = Object.getPrototypeOf
  3. , x = {};
  4. module.exports = function (/*customCreate*/) {
  5. var setPrototypeOf = Object.setPrototypeOf
  6. , customCreate = arguments[0] || create;
  7. if (typeof setPrototypeOf !== 'function') return false;
  8. return getPrototypeOf(setPrototypeOf(customCreate(null), x)) === x;
  9. };