1.1.0 • Published 2 years ago

rescript-js-map v1.1.0

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

Rescript JS Map

Rescript JS Map is a ReScript library that provides bindings to the JavaScript Map data type.

Installation

Using yarn or npm:

yarn add rescript-js-map
npm install --save rescript-js-map

This package relies on the rescript-js-iterator package for Iterator bindings. In your bsconfig.json, add:

{
  "bs-dependencies": ["rescript-js-map", "rescript-js-iterator"]
}

Usage

module Map = Js_map
let map = Map.make()

let mutatedMap = map->Map.set("hello", "world")
let isPhysicallyEqual = map === mutatedMap // true
let hello = map->Map.get("hello") // Some("world")
let hasHello = map->Map.has("hello") // true
let foo = map->Map.get("bar") // None
let size = map->Map.size // 1

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

1.1.0

2 years ago

1.0.0

2 years ago

1.0.0-beta.5

2 years ago

1.0.0-beta.4

2 years ago

1.0.0-beta.3

2 years ago

1.0.0-beta.2

2 years ago

1.0.0-beta.1

2 years ago

1.0.0-beta.0

2 years ago