1.0.0-5 • Published 3 years ago

uncased v1.0.0-5

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
3 years ago

uncased

Case-insensitive Map

Use it just like any other Map.

Its keys can are case-insensitive strings.

Its values can be strings and/or Uncased maps.

Type coercion is automatic, however, Symbols will not work.

No dependencies.

Installation: yarn add uncased

Bonus!

const uMap = require('uncased');
const map = new uMap();
map.set('FOO', 'bar');
const obj = map.obj;
obj.foo // bar
obj.Foo // bar
obj.FiZz = 'buzz' // buzz
obj.fizz // buzz
map.get('fiZZ') // buzz
map.add({ a: { b: { c: { d: 'e' } } } })
map.obj.a.obj.b.obj.c.obj.d // e

map.obj returns a Proxy object, which you can use instead of the map!

map.str returns a Proxy object, which only gives you strings.

Free to use, under GNU GPL. See License.

1.0.0-5

3 years ago

1.0.0-4

3 years ago

1.0.0-3

3 years ago

1.0.0-2

3 years ago

1.0.0-1

3 years ago