Package detail

wonka

0no-co8.2mMIT6.3.5

A tiny but capable push & pull stream library for TypeScript and Flow

wonka, typescript, events, callbag

readme

Wonka

A tiny but capable push & pull stream library for TypeScript and Flow, loosely following the callbag spec

NOTE: The currently released version v6 is only compatible now with TypeScript, Flow, and JavaScript. If you're looking for Reason/OCaml/esy/dune support, please check v5, and if you're looking for the legacy version of this library check v4.


NPM Version License Test Coverage Minified gzip size

“There’s no earthly way of knowing
Which direction we are going
There’s no knowing where we’re rowing
Or which way the river’s flowing” - Willy Wonka


Wonka

Wonka is a lightweight iterable and observable library loosely based on the callbag spec. It exposes a set of helpers to create streams, which are sources of multiple values, which allow you to create, transform and consume event streams or iterable sets of data.

Documentation

See the documentation at wonka.kitten.sh for more information about using wonka!

The raw markdown files can be found in this repository in the docs folder.

changelog

wonka

6.3.5

Patch Changes

  • Exclude sourcesContent from published sourcemaps Submitted by @kitten (See 68e608f)

6.3.4

Patch Changes

  • Add missing Symbol.observable global declaration back to typings Submitted by @kitten (See #168)

6.3.3

Patch Changes

  • Improve compatibility of fromAsyncIterable and toAsyncIterable. The toAsyncIterable will now output an object that's both an AsyncIterator and an AsyncIterable. Both helpers will now use a polyfill for Symbol.asyncIterator to improve compatibility with the Hermes engine and Babel transpilation Submitted by @kitten (See #165)

6.3.2

Patch Changes

  • Publish with npm provenance Submitted by @kitten (See #161)

6.3.1

Patch Changes

  • ⚠️ Fix missing declare keyword on internal ambient enums Submitted by @kitten (See #159)

6.3.0

Minor Changes

  • Add addOne argument to takeWhile, allowing an additional value to be issued Submitted by @kitten (See #156)

Patch Changes

  • Convert Push<T> and Start<T> signals to { tag, 0: value } objects, which are sufficiently backwards compatible and result in slightly faster execution in v8 Submitted by @kitten (See #155)

6.2.6

Patch Changes

  • ⚠️ Fix missing source contents in Wonka sourcemaps Submitted by @kitten (See 56d9708)
  • ⚠️ Fix internal SignalKind and TalkbackKind enums not compiling away Submitted by @kitten (See #154)

6.2.5

Patch Changes

  • Make closed: boolean on ObservableSubscriptions a required field to comply with the Observable proposal's type spec Submitted by @naporin0624 (See #151)

6.2.4

Patch Changes

  • Add missing overload definition for filter, which allows types to be narrowed, e.g. by specifying a type predicate return type Submitted by @kitten (See #149)

6.2.3

Patch Changes

  • ⚠️ Fix overload of pipe type not being applied in bundled d.ts file, by @kitten (See #144)

6.2.2

Patch Changes

  • ⚠️ Fix missing Symbol.observable typings and remove const enum exports, which aren't usable in isolated modules, by @kitten (See #141)

6.2.1

Patch Changes

  • ⚠️ Fix accidental addition of postinstall script rather than prepare script, by @kitten (See #138)

6.2.0

Minor Changes

  • Implement toAsyncIterable, converting a Wonka source to a JS Async Iterable, by @kitten (See #133)
  • Implement d.ts bundling. Only a single wonka.d.ts typings file will now be available to TypeScript, by @kitten (See #135)
  • Add extensive TSDoc documentation for all wonka internals and exports. This will replace the documentation and give consumers more guidance on each of the library's extensive utilities, by @kitten (See #136)

Patch Changes

  • ⚠️ Fix promise timing by adding missing Promise.resolve() tick to toPromise sink function, by @kitten (See #131)
  • ⚠️ Fix implementation of Observable spec as such that Observable.subscribe(onNext, onError, onComplete) becomes valid, by @kitten (See #132)