@konker.dev/effect-ts-prelude
TypeScript icon, indicating that this package has built-in type declarations

0.0.15 • Public • Published

@konker.dev/effect-ts-prelude

A prelude to conveniently import commonly used modules from Effect-TS

CI License

Example Usage

import * as P from '@konkerdotdev/effect-ts-prelude';

export function strToNum(s: string): P.Effect.Effect<never, Error, number> {
  return P.pipe(s, P.Schema.decode(P.Schema.NumberFromString), P.Effect.mapError(P.toError));
}

P.assert(P.Effect.runSync(strToNum('1')) === 1);

Package Sidebar

Install

npm i @konker.dev/effect-ts-prelude

Weekly Downloads

2

Version

0.0.15

License

ISC

Unpacked Size

9.03 kB

Total Files

6

Last publish

Collaborators

  • konker
  • morningwoodsoftware