
Product
Introducing Module Reachability: Focus on the Vulnerabilities That Matter
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
text-decoder
Advanced tools
Streaming text decoder that preserves multibyte Unicode characters.
npm i text-decoder
const TextDecoder = require('text-decoder')
const td = new TextDecoder()
td.push(Buffer.of(0xf0, 0x9f, 0x92)) // returns ''
td.push(Buffer.of(0xa9)) // returns '💩'
const td = new TextDecoder([encoding])
Create a text decoder. encoding
defaults to utf8
.
const string = td.push(data)
Push either a Buffer
or a string
to the text decoder. Returns the decoded string, buffering any partial data.
const string = td.end([data])
End the decoder, optionally pushing a final piece of data. Returns the decoded string.
Apache-2.0
FAQs
Streaming text decoder that preserves multibyte Unicode characters
The npm package text-decoder receives a total of 8,934,863 weekly downloads. As such, text-decoder popularity was classified as popular.
We found that text-decoder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Company News
Socket is bringing best-in-class reachability analysis into the platform — cutting false positives, accelerating triage, and cementing our place as the leader in software supply chain security.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.