https://github.com/make-github-pseudonymous-again/js-dict
dictionary ADT code bricks for JavaScript
https://github.com/make-github-pseudonymous-again/js-dict
Last synced: about 1 month ago
JSON representation
dictionary ADT code bricks for JavaScript
- Host: GitHub
- URL: https://github.com/make-github-pseudonymous-again/js-dict
- Owner: make-github-pseudonymous-again
- License: agpl-3.0
- Created: 2014-11-14T00:06:40.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2021-04-26T14:08:55.000Z (almost 5 years ago)
- Last Synced: 2025-03-10T18:12:44.809Z (11 months ago)
- Language: JavaScript
- Homepage: http://aureooms.github.io/js-dict/
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[js-dict](http://make-github-pseudonymous-again.github.io/js-dict)
==
Dictionary ADT code bricks for JavaScript. Parent is
[aureooms/js-data-structures](https://github.com/make-github-pseudonymous-again/js-data-structures).
[](https://raw.githubusercontent.com/make-github-pseudonymous-again/js-dict/master/LICENSE)
[](https://www.npmjs.org/package/@aureooms/js-dict)
[](http://bower.io/search/?q=@aureooms/js-dict)
[](https://travis-ci.org/make-github-pseudonymous-again/js-dict)
[](https://coveralls.io/r/make-github-pseudonymous-again/js-dict)
[](https://david-dm.org/make-github-pseudonymous-again/js-dict#info=dependencies)
[](https://david-dm.org/make-github-pseudonymous-again/js-dict#info=devDependencies)
[](https://codeclimate.com/github/make-github-pseudonymous-again/js-dict)
[](https://www.npmjs.org/package/@aureooms/js-dict)
[](https://github.com/make-github-pseudonymous-again/js-dict/issues)
[](http://inch-ci.org/github/make-github-pseudonymous-again/js-dict)
Can be managed through [duo](https://github.com/duojs/duo),
[component](https://github.com/componentjs/component),
[bower](https://github.com/bower/bower), or
[npm](https://github.com/npm/npm).
```js
let dict = require( "@aureooms/js-dict" ) ;
```
## Use
```js
let buddies = new dict.Dict( { } ) ;
buddies.length ; // 0
buddies.set( "Camus" , "Albert" ) ;
buddies.length ; // 1
buddies.set( "Lorenz" , "Konrad" ) ;
buddies.length ; // 2
buddies.get( "Camus" ) ; // "Albert"
buddies.get( "Lorenz" ) ; // "Konrad"
buddies.getdefault( "Lovecraft" , "Cthulhu" ) ; // "Cthulhu"
```