@basic-streams/of

of operator for basic-streams

Usage no npm install needed!

<script type="module">
  import basicStreamsOf from 'https://cdn.skypack.dev/@basic-streams/of';
</script>

README

@basic-streams/of

of<T>(value: T): Stream<T>

Creates a stream containing the given value.

import of from "@basic-streams/of"

const stream = of(1)

stream(x => {
  console.log(x)
})

// > 1