monads-maybe
A simple wrapper of javascript statement branching that provide safe error handling and test friendly
Usage
npm install monads-maybe
const arr = 'one' 'two' 'three' const log = consolelog const hasOne = arr let isOne = mayBe // has one isOne = mayBe // false const hasFour = arr let isFour = mayBe // has no four isFour = mayBe // world isFour = mayBe // false
License
The MIT License (MIT)
Copyright (c) 2017 Shahrul Nizam Selamat