How to use the neverthrow/dist.ok function in neverthrow

To help you get started, we’ve selected a few neverthrow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github robotty / dank-twitch-irc / lib / utils.ts View on Github external
    return (p.then(r => ok(r), (e) => err(e))) as Promise>;
}

neverthrow

Stop throwing errors, and instead return Results!

MIT
Latest version published 1 month ago

Package Health Score

85 / 100
Full package analysis

Popular neverthrow functions