Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@stardazed/utf8
Advanced tools
Encode and decode strings to and from utf8 byte sequences.
Will use TextEncoder
and TextDecoder
classes when available, otherwise
falls back to a polyfill implementation.
npm install @stardazed/utf8
pnpm install @stardazed/utf8
yarn add @stardazed/utf8
import { utf8Encode, utf8Decode } from "@stardazed/utf8";
// returns an Uint8Array
const encoded = utf8Encode("data⚠️ to🌈 encode😺");
// takes an ArrayBuffer, a TypedArray or a DataView, returns a string
const decoded = utf8Decode(encoded);
// You can optionally skip handling of a byte order marker
// this can fix an issue with a zero-width non-breaking-space
// (codepoint 0xFEFF) being at the beginning of your stream.
const decoded2 = utf8Decode(encoded, { ignoreBOM: true });
// For both encode and decode you can also specify you want to use
// the polyfill implementation and not the native one.
// This can be useful to have a perfectly consistent encoding across
// all platforms.
const a = utf8Encode("stuff", { forceUsePolyfill: true });
const b = utf8Decode(a, { forceUsePolyfill: true });
© 2018 by Arthur Langereis (@zenmumbler)
MIT
FAQs
Encode and decode utf8 sequences
The npm package @stardazed/utf8 receives a total of 1 weekly downloads. As such, @stardazed/utf8 popularity was classified as not popular.
We found that @stardazed/utf8 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.