1.0.3 • Published 5 years ago

@pixelhandler/ts-maybe v1.0.3

Weekly downloads
1
License
Apache-2.0
Repository
gitlab
Last release
5 years ago

TS-Maybe

An option type Maybe<Just|Nothing> in TypeScript

Why Maybe ?

What is a Maybe?

  • Maybe<Just|Nothing> provides safe handling of null|undefined or any value
  • A Maybe implements Pointed Functor, an Applicative, and Monad interfaces
  • Also known as a nullable type as Option<Some|None>

Interfaces and Maybe type inspired by:

Functional programming resources:

Development

Use LTS version of Node.js

Clone the repo then, within the project root, run:

  • npm install

Testing

This boilerplate setup uses TypeScript and Tape as a test runner.

Use node scripts in package.json file

  • Check syntax npm run lint
  • Run tests npm run test
  • Watch changes and run tests npm run watch
1.0.3

5 years ago

1.0.3-0

5 years ago

1.0.2-0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago