src/nodejs/jstream

    Dark Mode
Search:
Group by:

Types

StreamReadable {.importjs: "stream.Readable".} = ref object of JsRoot
  destroyed*, readable*, readableEnded*, readableFlowing*, readableObjectMode*: bool
  readableHighWaterMark*, readableLength*: int
  readableEncoding*: cstring
https://nodejs.org/api/stream.html#stream_class_stream_readable
StreamWritable {.importjs: "stream.Writable".} = ref object of JsRoot
  destroyed*, writable*, writableEnded*, writableCorked*: bool
  writableFinished*, writableNeedDrain*, writableObjectMode*: bool
  writableHighWaterMark*, writableLength*: int
https://nodejs.org/api/stream.html#stream_class_stream_writable

Procs

func cork(self: StreamWritable) {.importjs: "#.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_cork
func ends(self: StreamWritable; chunk: auto; encoding = "utf-8".cstring): StreamWritable {.
    importjs: "#.end(#, #)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_end_chunk_encoding_callback
func ends[T](self: StreamWritable; callback: T): StreamWritable {.
    importjs: "#.end(#)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_end_chunk_encoding_callback
func finished(self: StreamReadable or StreamWritable): auto {.
    importjs: "stream.finished(#)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_unshift_chunk_encoding
func finished[T](self: StreamReadable or StreamWritable; callback: T): auto {.
    importjs: "stream.finished(#, #)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_unshift_chunk_encoding
func importStream() {.importjs: "import * as stream from \'stream\'@",
                      ...raises: [], tags: [].}
Alias for import * as module_name from 'module_name';. Must be called once before using the module
func isPaused(self: StreamReadable): bool {.importjs: "#.$1()", ...raises: [],
    tags: [].}
https://nodejs.org/api/stream.html#stream_readable_ispaused
func pause(self: StreamReadable): StreamReadable {.importjs: "#.$1()",
    ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_pause
func pipe(self: StreamReadable; destination: StreamWritable; ends = true): StreamWritable {.
    importjs: "#.$1(#, {end: #})", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_pipe_destination_options
func pipeline(self: StreamReadable; destination: StreamWritable): auto {.
    importjs: "stream.pipeline(#, #)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_unshift_chunk_encoding
func pipeline[T](self: StreamReadable; destination: StreamWritable; callback: T): auto {.
    importjs: "stream.pipeline(#, #, #)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_unshift_chunk_encoding
func read(self: StreamReadable): auto {.importjs: "#.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_read_size
func read(self: StreamReadable; size: int): auto {.importjs: "#.$1(#)",
    ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_read_size
func refresh(self: StreamReadable) {.importjs: "#.read(0)", discardable,
                                     ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_read_0
func requireStream() {.importjs: "const stream = require(\'stream\')@",
                       ...raises: [], tags: [].}
Alias for const module_name = require('module_name');. Must be called once before using the module
func resume(self: StreamReadable): StreamReadable {.importjs: "#.$1()",
    ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_resume
func setDefaultEncoding(self: StreamWritable; encoding: cstring): StreamWritable {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_setdefaultencoding_encoding
func setEncoding(self: StreamReadable; encoding: cstring): StreamReadable {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_setencoding_encoding
func uncork(self: StreamWritable) {.importjs: "#.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_uncork
func unpipe(self: StreamReadable; destination: StreamWritable): StreamReadable {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_unpipe_destination
func unshift(self: StreamReadable; chunk: auto; encoding = "utf-8".cstring) {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_unshift_chunk_encoding
func write(self: StreamWritable; chunk: auto; encoding = "utf-8".cstring): bool {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback
func write[T](self: StreamWritable; callback: T): bool {.importjs: "#.$1(#)",
    ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback