Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Lightweight dictionaries for ES6

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 COPYING
Octocat-spinner-32 README.md
Octocat-spinner-32 dict.js
README.md

dict.js

by Dave herman

Simple dictionaries with lightweight syntax, using ES6 features (proxies, weak maps).

Examples:

js> var d = new Dict({ foo: 17, bar: "hello world", baz: 42 });
js> Dict.size(d)
3
js> d.foo
17
js> "bar" in d
true
js> "hasOwnProperty" in d
false
js> d.hasOwnProperty = "yo dawg"
"yo dawg"
js> Dict.size(d)
4
js> delete d.baz
true
js> "baz" in d
false
js> d instanceof Dict
true
js> d instanceof Object
false
Something went wrong with that request. Please try again.