6.0.1 • Published 3 years ago

@attack-monkey/lean-f-ts-prelude v6.0.1

Weekly downloads
10
License
ISC
Repository
-
Last release
3 years ago

Lean Functional Typescript

Overview

Lean is a Pure Functional way of writing Typescript applications.

It achieves purity through the concept of Pure Functions and abstracted effects.

Install

While Lean is more conceptual than anything else, the Lean Prelude provides utilities such as flows and pattern matching.

npm i @attack-monkey/lean-f-ts-prelude

import { pipe, match } from '@attack-monkey/lean-f-ts-prelude/dist/src'

What

This package is a light-weight 'Prelude' of Lean.

Read the docs for more info on how to use.

Features

  • Purity through Pure Functions
  • Type inferred pipes (sync, async, conditional)
  • Type inferred pattern matching
  • Simplicity

Learn

Read the docs on Github for the full run-down

Changes

6.0.0

  • Modification to Variant handling in matches 5.0.0
  • Removal of Flow as this can be achieved with native promises
  • Addition of Variants for lightweight matching of encoded values

4.0.0

  • Change PatternMatch to Match
  • Change to Match api that removes the done method and instead uses otherwise which re-enforces exhaustiveness
  • Added the $int runtime interface for matching on integers as oposed to any number

3.0.0

  • Mutability is managed via mutable
  • Addition of flows and streams + helper macros wait and logAndThrough

2.0.0

  • Move to Pure Functional with the concept of Pure Macros
  • Mutability can be managed via the PureMutable Macro
  • Simplification of API
    • Removal of fpipe, pipe and replaced with flow
    • Removal of fmatch, in favor of match

1.1.0

  • Added freeze to create immutable objects / arrays
  • Added clone to deep clone objects /arrays
  • Added flow / Flow (experimental) for async piping, streams, conditional flows, and more
6.0.1

3 years ago

6.0.0

3 years ago

5.0.0

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

4.0.3

3 years ago

4.0.2

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.1.0

3 years ago

1.1.0

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago