@limwa/effect-bits
v1.1.0
Published
This is a library composed of utilities for working with [effect](https://github.com/effect-ts/effect).
Downloads
2
Readme
@limwa/effect-bits
This is a library composed of utilities for working with effect.
Installation
# npm
npm install @limwa/effect-bits
# yarn
yarn add @limwa/effect-bits
# pnpm
pnpm add @limwa/effect-bitsUsage
import { Effect, Stream } from 'effect';
import { SinkBits } from '@limwa/effect-bits';
const stream = Stream.make(
new Uint8Array([64, 108, 105, 109, 119, 97]),
new Uint8Array([47, 101, 102, 102, 101, 99]),
new Uint8Array([116, 45, 98, 105, 116, 115]),
);
const text = stream.pipe(
Stream.run(SinkBits.decodeText('utf-8')),
Effect.runSync,
);