TypeTags .TextEncoder

Overview

⚠️

Experimental: This is an experimental technology

TextEncoder takes a stream of code points as input and emits a stream of UTF-8 bytes.

Usage

import { TypeTags } from 'typetags'
const encoder = new TextEncoder()
TypeTags.get(encoder)
// → [object TextEncoder]
const view = encoder.encode('€')
TypeTags.get(view) === TypeTags.TextEncoder
// → false

Metadata (TType)

MetadataValue
.typeTextEncoder
.tag[object TextEncoder]
.builtin()undefined
.getTag()[object TextEncoder]
.hasSpecialArgs()false
.instance()undefined
.instanceTypeOf()object
.info()see more
.isAvailable()true
.isConstructor()true
.isFactory()false
.isFunction()true
.isGlobal()true
.isIterator()false
.isNested()false
.isObject()false
.isPrimitive()false
.isStringifiable()true
.isSyntatic()false
.isTypedArray()false
.ownKeys()[length, prototype, name]
.toString()function toString() { [native code] }
.typeOf()function

Signature

declare type ITypeTags = {
[key in Types | NestedTypes]: Tags
}
declare interface Predicate {
predicate(value: any): boolean
}

See MDN Web Docs