Changeset 79a0317 for imaps-frontend/node_modules/unbox-primitive/index.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/unbox-primitive/index.js
r0c6b92a r79a0317 2 2 3 3 var whichBoxedPrimitive = require('which-boxed-primitive'); 4 var callBound = require('call-b ind/callBound');4 var callBound = require('call-bound'); 5 5 var hasSymbols = require('has-symbols')(); 6 6 var hasBigInts = require('has-bigints')(); … … 12 12 var bigIntValueOf = hasBigInts && callBound('BigInt.prototype.valueOf'); 13 13 14 /** @type {import('.')} */ 14 15 module.exports = function unboxPrimitive(value) { 15 16 var which = whichBoxedPrimitive(value); … … 31 32 throw new EvalError('somehow this environment does not have Symbols, but you have a boxed Symbol value. Please report this!'); 32 33 } 33 return symbolValueOf(value); 34 // eslint-disable-next-line no-extra-parens 35 return /** @type {Exclude<typeof symbolValueOf, false>} */ (symbolValueOf)(value); 34 36 } 35 37 if (which === 'BigInt') { 36 return bigIntValueOf(value); 38 // eslint-disable-next-line no-extra-parens 39 return /** @type {Exclude<typeof bigIntValueOf, false>} */ (bigIntValueOf)(value); 37 40 } 38 41 throw new RangeError('unknown boxed primitive found: ' + which);
Note:
See TracChangeset
for help on using the changeset viewer.