symbol.prototype.description
Version:
Spec-compliant shim for Symbol.prototype.description proposal.
14 lines (10 loc) • 365 B
JavaScript
;
var $TypeError = require('es-errors/type');
var getSymbolDescription = require('get-symbol-description');
/** @type {import('./implementation')} */
module.exports = function description() {
if (this == null) { // eslint-disable-line eqeqeq
throw new $TypeError('`this` value must be object-coercible');
}
return getSymbolDescription(this);
};