Gathering detailed insights and metrics for @execonline-inc/maybe-adapter
Gathering detailed insights and metrics for @execonline-inc/maybe-adapter
Gathering detailed insights and metrics for @execonline-inc/maybe-adapter
Gathering detailed insights and metrics for @execonline-inc/maybe-adapter
A collection of Elm-inspired functional-programming tools in Typescript, focused on eliminating runtime exceptions and reducing testing burden.
npm install @execonline-inc/maybe-adapter
Typescript
Module System
Node Version
NPM Version
TypeScript (98.14%)
JavaScript (1.86%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
235 Commits
23 Watchers
24 Branches
30 Contributors
Updated on Apr 16, 2025
Latest Version
4.7.0
Package Id
@execonline-inc/maybe-adapter@4.7.0
Unpacked Size
5.76 kB
Size
2.15 kB
File Count
5
NPM Version
lerna/5.5.2/node@v18.12.0+arm64 (darwin)
Node Version
18.12.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
maybe-adapter
The maybe-adapter
package provides functions to convert to/from Maybe
types.
toResult
This function has a curried and non-curried form. It takes an error and a Maybe
. When the Maybe
is a Just
, a successful Result
is returned with the wrapped value, otherwise an error Result
is returned with the given error value.
1import { toResult } from '@execonline-inc/maybe-adapter'; 2import { nothing } from 'maybeasy'; 3 4toResult<string, number>('an error message')(nothing());
toTask
This function has a curried and non-curried form. It takes an error and a Maybe
. When the Maybe
is a Just
, a succeeding Task
is returned with the wrapped value, otherwise a failing Task
is returned with the given error value.
1import { toTask } from '@execonline-inc/maybe-adapter'; 2import { nothing } from 'maybeasy'; 3 4toTask<string, number>('an error message')(nothing());
fromBool
, when
This function has a curried and non-curried form. It wraps a given value in a Maybe
depending on either the given boolean value or boolean return value of the given function.
Also, if the first argument is a function, the second argument is passed to that function for evaluation. (See advanced usage example)
Aliased as when
1import { fromBool } from '@execonline-inc/maybe-adapter'; 2 3fromBool(true)(123); 4fromBool((): boolean => true)(123); 5// Just<123> 6 7// Advanced usage. 8mapMaybe(when(even), [1, 2, 3, 4]); 9// [2, 4]
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 6/30 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More