uncased
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-5 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i uncased

Weekly Downloads

3

Version

1.0.0-5

License

GPL-3.0-or-later

Unpacked Size

51.2 kB

Total Files

10

Last publish

Collaborators

  • realprokopschield