# rescript-js-map

> ReScript bindings to the native JavaScript Map data type

Latest version **1.1.0** (published 2022-01-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install rescript-js-map
pnpm add rescript-js-map
yarn add rescript-js-map
bun add rescript-js-map
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-01-05 |
| First published | 2022-01-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Oliver Fencott |
| Maintainers | oliverfencott |
| Keywords | rescript, bindings, map |

## Links

- npm: https://www.npmjs.com/package/rescript-js-map
- Repository: https://github.com/resinfo/rescript-js-map
- Homepage: https://github.com/resinfo/rescript-js-map#readme
- Issues: https://github.com/resinfo/rescript-js-map/issues
- npm.io page: https://npm.io/package/rescript-js-map

## Dependencies (1)

- [rescript-js-iterator](https://npm.io/package/rescript-js-iterator.md) ^1.1.0

## Recent versions

- 1.1.0 (latest) — 2022-01-05
- 1.0.0 — 2022-01-04
- 1.0.0-beta.5 — 2022-01-04
- 1.0.0-beta.4 — 2022-01-04
- 1.0.0-beta.3 — 2022-01-04
- 1.0.0-beta.2 — 2022-01-04
- 1.0.0-beta.1 — 2022-01-04
- 1.0.0-beta.0 — 2022-01-04

## README

# Rescript JS Map

Rescript JS Map is a [ReScript](https://rescript-lang.org/) library that provides bindings to the JavaScript [Map data type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map).

## Installation

Using `yarn` or `npm`:

```bash
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:

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

## Usage

```rescript
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](https://choosealicense.com/licenses/mit/)

---
_Source: https://npm.io/package/rescript-js-map · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
