Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/get-symbol-description/index.js
r0c6b92a r79a0317 3 3 var GetIntrinsic = require('get-intrinsic'); 4 4 5 var callBound = require('call-b ind/callBound');5 var callBound = require('call-bound'); 6 6 7 7 var $SyntaxError = require('es-errors/syntax'); 8 8 var getGlobalSymbolDescription = GetIntrinsic('%Symbol.keyFor%', true); 9 /** @type {undefined | ((thisArg: symbol | Symbol) => symbol)} */ 9 10 var thisSymbolValue = callBound('%Symbol.prototype.valueOf%', true); 11 /** @type {undefined | ((thisArg: symbol | Symbol) => string)} */ 10 12 var symToStr = callBound('Symbol.prototype.toString', true); 13 /** @type {(thisArg: string, start?: number, end?: number) => string} */ 11 14 var $strSlice = callBound('String.prototype.slice'); 12 15 13 16 var getInferredName = require('./getInferredName'); 14 17 18 /** @type {import('.')} */ 15 19 /* eslint-disable consistent-return */ 16 20 module.exports = callBound('%Symbol.prototype.description%', true) || function getSymbolDescription(symbol) { … … 38 42 } 39 43 40 desc = $strSlice(symToStr(sym), 7, -1); // str.slice('Symbol('.length, -')'.length); 44 // eslint-disable-next-line no-extra-parens 45 desc = $strSlice(/** @type {NonNullable<typeof symToStr>} */ (symToStr)(sym), 7, -1); // str.slice('Symbol('.length, -')'.length); 41 46 if (desc) { 42 47 return desc;
Note:
See TracChangeset
for help on using the changeset viewer.