nodejs port of python's defaultdict
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
Makefile
README.md
index.js
package.json

README.md

defaultdict

Nodejs port of python defaultdict

examples

var DefaultDict = require('defaultdict')

// create dict
var dict = new DefaultDict('baz');

// works like normal dict
dict.set('foo', 'bar');
dict.get('foo');
//=> 'bar'

// get undefined keys
dict.get('qux');
//=> 'baz'