Skip to content

Custom-remove features of a Symbol implementation.

License

Notifications You must be signed in to change notification settings

stevenvachon/incomplete-symbol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

incomplete-symbol NPM Version Build Status Coverage Status

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.

Installation

Node.js >= 8 is required. To install, type this at the command line:

npm install incomplete-symbol

Usage

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

Arguments

exclusions

Type: Array
Default value: []
The output Symbol function and any instances created with it will not expose each listed property/method.

About

Custom-remove features of a Symbol implementation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published