lolodashdeprecated

Inspired by Scala's `Try` classes (including `Success` and `Failure`).

Usage no npm install needed!

<script type="module">
  import lolodash from 'https://cdn.skypack.dev/lolodash';
</script>

README

pipeline status coverage report

lolodash__

Inspired by Scala's Try classes (including Success and Failure).

Go lolodash__ or go nono

By using lolodash you can avoid most try-catch blocks in your code. That is because lolodash wraps around possible exceptions and simply returns whether it succeeded or failed.

Don't get it? Here is an example that will always succeed:

let result = __<User>(() => userFactory.create('Jack'))
                .map(e => e.name)
                .map(e => e.substr(-1) === 'k')
                .value;

// Result will be true.
console.log(result);