![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
The ErrorT transformer, ErrorT
, adds error control to a monad. The base type, Error
, provides error logic on its own.
# To use as standalone package
$ npm install --save akh.error
# To use as part of akh library
$ npm install --save akh
The ErrorT
and Error
implement the Fantasy Land monad, functor, and applicative functor interfaces.
// Error monad
require('akh.error').Error
require('akh').Error
// Error monad transformer
require('akh.error').ErrorT
require('akh').ErrorT
Error.run(m, ok, err)
, m.run(ok, err)
Perform a error computation m
and invoke ok
if it succeeds and err
if it fails.
const c =
Error.of(3)
.map(x => -x);
Error.run(c, console.error, console.log); // logs: -3
ErrorT.run(t, ok, err)
, t.run(ok, err)
Same as Error.run
but for a monad transformer. Returns an Error
value inside of the inner monad.
Error.attempt(m, def)
, m.attempt(def)
Perform an error computation m
and return the result if it succeeds and def
if it fails.
Error.try(m, e)
, m.try(e)
Perform an error computation m
and return the result if it succeeds and invoke e
if it fails
Error.fail(x)
ErrorT(m).fail(x)
Construct a error value value.
Error.handle(f)
ErrorT(m).handle(f)
Handle an error.
Contributions are welcome.
To get started:
$ cd akh-error
$ npm install # install dev packages
$ npm test # run tests
FAQs
Akh error monad and monad transformer
The npm package akh.error receives a total of 499 weekly downloads. As such, akh.error popularity was classified as not popular.
We found that akh.error demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.