Current section
Files
Jump to
Current section
Files
src/gossamer/text_decoder_stream.ffi.mjs
// src/gossamer/text_decoder_stream.ffi.ts
import { fromEncoding } from "./encoding.ffi.mjs";
import { toTextDecoderOptions } from "./text_decoder.ffi.mjs";
import { toResult } from "../utils/result.ffi.mjs";
var new_ = () => {
return new TextDecoderStream();
};
var new_with = (label, options) => {
return toResult.fromThrows(
() => new TextDecoderStream(label, toTextDecoderOptions(options))
);
};
var readable = (decoder) => {
return decoder.readable;
};
var writable = (decoder) => {
return decoder.writable;
};
var encoding = (decoder) => {
return fromEncoding(decoder.encoding);
};
var is_fatal = (decoder) => {
return decoder.fatal;
};
var is_ignore_bom = (decoder) => {
return decoder.ignoreBOM;
};
export {
encoding,
is_fatal,
is_ignore_bom,
new_,
new_with,
readable,
writable
};