is-weak-map.js 403 B

12345678910111213
  1. "use strict";
  2. var toStringTagSymbol = require("es6-symbol").toStringTag
  3. , objToString = Object.prototype.toString
  4. , id = "[object WeakMap]"
  5. , Global = typeof WeakMap === "undefined" ? null : WeakMap;
  6. module.exports = function (value) {
  7. return (value && ((Global && (value instanceof Global)) ||
  8. (objToString.call(value) === id) || (value[toStringTagSymbol] === "WeakMap"))) ||
  9. false;
  10. };