method Enumerable.prototype.writeTo
Enumerable.prototype.writeTo(
writer: Writable<T> | WritableStream<T>,
options?: { noclose?: boolean; },
): Promise<void>

Write all data to the writer.

Example

Write some numbers to stdout.

range({to: 99})
  .map(n => n.toString())
  .transform(toBytes)
  .writeTo(Deno.stdout.writable, {noclose: true});

Parameters

writer: Writable<T> | WritableStream<T>

The writer.

optional
options: { noclose?: boolean; }

Return Type

Promise<void>

Usage

import { Enumerable } from ".";