# @collectable/map

> [Collectable.js] Immutable Map

Latest version **4.0.1** (published 2018-01-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @collectable/map
pnpm add @collectable/map
yarn add @collectable/map
bun add @collectable/map
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2018-01-20 |
| First published | 2017-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 281 |
| Maintainers | axefrog, collectable |

## Links

- npm: https://www.npmjs.com/package/@collectable/map
- Repository: git@github.com:frptools/collectable
- Issues: https://github.com/frptools/collectable/issues
- npm.io page: https://npm.io/package/@collectable/map

## Dependencies (1)

- [@collectable/core](https://npm.io/package/@collectable/core.md) ^5.0.1

## Recent versions

- 4.0.1 (latest) — 2018-01-20
- 3.1.0 — 2017-07-12
- 3.0.1 — 2017-07-11
- 3.0.0 — 2017-07-11
- 2.6.0 — 2017-03-27
- 2.5.0 — 2017-03-27
- 2.4.0 — 2017-03-27
- 2.3.0 — 2017-03-26
- 2.2.0 — 2017-03-25
- 2.1.0 — 2017-03-24
- 2.0.1 — 2017-03-22
- 2.0.0 — 2017-03-19
- 1.2.0 — 2017-03-18
- 1.1.0 — 2017-03-12
- 1.0.0 — 2017-03-11
- … 2 more at https://npm.io/package/@collectable/map/versions

## README

# [![Collectable.js: Immutable Map](https://github.com/frptools/collectable/raw/master/.assets/logo.png)](https://github.com/frptools/collectable)

# Immutable Map

> An persistent/immutable/functional map (dictionary) data structure

[![Build Status](https://travis-ci.org/frptools/collectable.svg?branch=master)](https://travis-ci.org/frptools/collectable)
[![NPM version](https://badge.fury.io/js/%40collectable%2Fmap.svg)](http://badge.fury.io/js/%40collectable%2Fmap)
[![GitHub version](https://badge.fury.io/gh/frptools%2Fcollectable.svg)](https://badge.fury.io/gh/frptools%2Fcollectable)
[![Gitter](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/FRPTools/Lobby)

 A Clojure-style hash array mapped trie, adapted from [Tylor Steinberger](https://github.com/TylorS)'s [TypeScript conversion](https://github.com/TylorS/typed-hashmap) of [Matt Bierner's HAMT](https://github.com/mattbierner/hamt_plus) implementation.

*This documentation is under construction. The list of functions, descriptions and examples are pending.*

## Installation

```bash
# via NPM
npm install @collectable/map

# or Yarn
yarn add @collectable/map
```

If you intend to use other data structures as well, install the main collectable package instead. It takes a dependency on each of these data structures, and so they will become available implicitly, after installation.

```bash
# via NPM
npm install collectable

# or Yarn
yarn add collectable
```

TypeScript type definitions are built in.

## Usage

Import and use the functions you need:

```js
import { fromObject, unwrap } from '@collectable/map';

const map = fromObject({ foo: 'bar' }); // => HashMap<{ foo: 'bar' }>
const obj = unwrap(map); // => { foo: 'bar' }
```

Use a modern bundler such as Webpack 2 or Rollup in order to take advantage of tree shaking capabilities, giving you maximum flexibility to use what you need while excluding anything else from the final build.

## API

All map-manipulation functions are available from module `@collectable/map`.

----

*Documentation pending*

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