@kingjs/dictionary
v1.0.6
Published
A dictionary.
Downloads
11
Readme
@kingjs/dictionary
A dictionary.
Usage
Create a object for which the in
operator returns false
for all values including 'toString'
like this:
'toString' in new Dictionary();
result:
false
API
declare class Dictionary { }
Remarks
Javascript objects are often used as dictionaries of strings to values. This is bad practice! An empty Javascript object is not an empty dictionary. It contains a 'toString'
key visible to the in
operator.
Install
With npm installed, run
$ npm install @kingjs/dictionary
License
MIT