0.2.1 • Published 2 years ago

lbear v0.2.1

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

LBear

CI version

A simple collections library based on ES6.

Installation

npm i lbear

Usage

Immutable Map

import { ImMap } from 'lbear/map'

const map = ImMap.of({ a: 1, b: 2, c: 3 })

for (const [k, v] of map) {
  console.log(`${k} => ${v}`)
}

Option

import { Option } from 'lbear/option'

const value = Option.some(1)
const empty = Option.none()

Seq

import { Seq } from 'lbear/seq'

const seq = Seq.of(1, 2, 3)
const odd = seq.filter(x => x % 2 == 1)
const arr = odd.toArray()

License

MIT License © 2021 XLor

0.2.1

2 years ago

0.2.0

2 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago