src/nodejs/jstream

    Dark Mode
Search:
Group by:
  Source   Edit

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   Source   Edit
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   Source   Edit

Procs

func cork(self: StreamWritable) {.importjs: "#.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_cork   Source   Edit
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   Source   Edit
func ends[T](self: StreamWritable; callback: T): StreamWritable {.
    importjs: "#.end(#)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_end_chunk_encoding_callback   Source   Edit
func finished(self: StreamReadable or StreamWritable): auto {.
    importjs: "stream.finished(#)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_unshift_chunk_encoding   Source   Edit
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   Source   Edit
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   Source   Edit
func isPaused(self: StreamReadable): bool {.importjs: "#.$1()", ...raises: [],
    tags: [].}
https://nodejs.org/api/stream.html#stream_readable_ispaused   Source   Edit
func pause(self: StreamReadable): StreamReadable {.importjs: "#.$1()",
    ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_pause   Source   Edit
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   Source   Edit
func pipeline(self: StreamReadable; destination: StreamWritable): auto {.
    importjs: "stream.pipeline(#, #)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_unshift_chunk_encoding   Source   Edit
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   Source   Edit
func read(self: StreamReadable): auto {.importjs: "#.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_read_size   Source   Edit
func read(self: StreamReadable; size: int): auto {.importjs: "#.$1(#)",
    ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_read_size   Source   Edit
func refresh(self: StreamReadable) {.importjs: "#.read(0)", discardable,
                                     ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_read_0   Source   Edit
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   Source   Edit
func resume(self: StreamReadable): StreamReadable {.importjs: "#.$1()",
    ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_resume   Source   Edit
func setDefaultEncoding(self: StreamWritable; encoding: cstring): StreamWritable {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_setdefaultencoding_encoding   Source   Edit
func setEncoding(self: StreamReadable; encoding: cstring): StreamReadable {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_setencoding_encoding   Source   Edit
func uncork(self: StreamWritable) {.importjs: "#.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_uncork   Source   Edit
func unpipe(self: StreamReadable; destination: StreamWritable): StreamReadable {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_readable_unpipe_destination   Source   Edit
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   Source   Edit
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   Source   Edit
func write[T](self: StreamWritable; callback: T): bool {.importjs: "#.$1(#)",
    ...raises: [], tags: [].}
https://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback   Source   Edit