0.0.28 • Published 2 years ago

schtate v0.0.28

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

schtate

Functional Wrappers for State Management

This library offers algebraic data types for managing state.

Motivation

Don't worry, if you aren't familiar with algebraic data types, this library is designed to be easy to consume regardless of prior functional programming experience.

I think it's safe to say that arrays are the most heavily leaned upon data structure we have in JavaScript/Typescript. This is because the JS language was modified to include a rich API for arrays. This API is inspired heavily by functional programming. You can write pure functions that act on each item of your array (if there are any) and you get a new copy of the array with each one. Even when modeling data as an object, it's common to convert the object to an array to iterate over it. Schtate aims to make it as easy to work with other types of data as it is to work with arrays.

Do I need to know Functional Programming to use schtate?

Inheriting code that uses FP can be daunting, as it can look quite different from imperative code. Composing functions into pipelines is pretty convenient, but if you aren't used to seeing it, it can be daunting and hard to read.

Schtate is designed to be easy to read and write to anybody who is familiar with Arrays and Promises. It is unlikely to be a full replacement for functional programming libraries like fp-ts or ramda.

Documentation

State

Maybe

Bool

Either

Result

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.19

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago