1.0.9 • Published 6 years ago

es6-two-way-map v1.0.9

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

es6-two-way-map

JavaScript bidirectional map implementation. With BiMap you can get value by key, and also key by value

Install

$ npm i -S es6-two-way-map

Usage

Import

import { BiMap } from 'es6-two-way-map';
const { BiMap } = require('es6-two-way-map/src');

Basic

const a = new BiMap([['a',1], ['a2', 2], ['a3', 3]]);
//Map { 'a' => 1, 1 => 'a', 'a2' => 2, 2 => 'a2', 'a3' => 2, 3 => 'a3' }

Side Effect

It will be fixed as soon as possible

const a = new BiMap([[1, 'a1'],['a3', 1]]);
//Map { 1 => 'a3', 'a1' => 1, 'a3' => 1 }
1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago