effect-utils
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

effect-utils

effect-utils is a simple library for using Effect. This library was created to handle the internal logic of pothos-plugin-effect and is intended for internal use. Care should be taken when using it for other purposes.

API

executeEffect(effect, runtime?)

Execute the given Effect using Runtime.runPromiseExit. It returns the value when result is Exit.Success<A>. and it throws the value if result is failure.

And it resolve Option<A> value into A | null.

executeStream(stream, runtime?)

Runs the given stream using `Stream.runForEach' and returns the AsyncIterable that was created using the Repeater.js.

And it resolve Option<A> value into A | null.

isStream

Determine whether the value is a stream or not.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i effect-utils

Weekly Downloads

88

Version

0.1.0

License

MIT

Unpacked Size

9.82 kB

Total Files

12

Last publish

Collaborators

  • imch