0.0.24 • Published 3 years ago

@browndragon/store v0.0.24

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

store

Stores a mapping ...k=>v (mapping the input key values to string values using a provided pattern).

Usage

import {Sparse} from '@browndragon/store';

let sparse = new Sparse();
sparse.set('hello', 1, 2);  // sparse
sparse.get(1, 2);  // 'hello'
sparse.pop(1, 2);  // 'hello'
sparse.get(1, 2);  // undefined
sparse.rmw(v=>1+(v||0), 1, 2);  // 1
sparse.rmw(v=>1+(v||0), 1, 2);  // 2
sparse.rmw(v=>1+(v||0), 1, 2);  // 3

Matrix

This also provides the class 'matrix', which has the more pleasant API of putting keys before values, and being explicitly 2 dimensional (the dimensions are referred to as 'u' and 'v').

0.0.23

3 years ago

0.0.24

3 years ago

0.0.21

3 years ago

0.0.22

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago