is-weak-map.js 406 B

12345678910111213141516
  1. 'use strict';
  2. var WeakMapPoly = require('../polyfill');
  3. module.exports = function (t, a) {
  4. a(t(undefined), false, "Undefined");
  5. a(t(null), false, "Null");
  6. a(t(true), false, "Primitive");
  7. a(t('raz'), false, "String");
  8. a(t({}), false, "Object");
  9. a(t([]), false, "Array");
  10. if (typeof WeakMap !== 'undefined') {
  11. a(t(new WeakMap()), true, "Native");
  12. }
  13. a(t(new WeakMapPoly()), true, "Polyfill");
  14. };