4.0.1 • Published 6 years ago

@collectable/map v4.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Collectable.js: Immutable Map

Immutable Map

An persistent/immutable/functional map (dictionary) data structure

Build Status NPM version GitHub version Gitter

A Clojure-style hash array mapped trie, adapted from Tylor Steinberger's TypeScript conversion of Matt Bierner's HAMT implementation.

This documentation is under construction. The list of functions, descriptions and examples are pending.

Installation

# 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.

# via NPM
npm install collectable

# or Yarn
yarn add collectable

TypeScript type definitions are built in.

Usage

Import and use the functions you need:

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

4.0.1

6 years ago

3.1.0

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.6.0

7 years ago

2.5.0

7 years ago

2.4.0

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago