Custom-remove features of a
Symbol
implementation.
This is useful when simulating the incomplete Symbol
implementations available in some of today's modern web browsers.
Node.js >= 8
is required. To install, type this at the command line:
npm install incomplete-symbol
const customizeSymbol = require('incomplete-symbol');
const exclusions = ['description', 'toStringTag'];
const IncompleteSymbol = customizeSymbol(exclusions);
const symbol = new IncompleteSymbol('foo');
console.log(IncompleteSymbol.toStringTag); //-> undefined
console.log(symbol.description); //-> undefined
Type: Array
Default value: []
The output Symbol
function and any instances created with it will not expose each listed property/method.