Security News
OpenJS: “XZ Utils Cyberattack Likely Not an Isolated Incident”
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
@aws-sdk/util-utf8-node
Advanced tools
Weekly downloads
Package description
The @aws-sdk/util-utf8-node package is designed for encoding and decoding UTF-8 content specifically in Node.js environments. It provides utilities to convert strings to UTF-8 byte arrays and vice versa, which is particularly useful when working with AWS SDKs that require such transformations for handling text in various AWS services.
UTF-8 Encoding
Converts a JavaScript string to a UTF-8 encoded byte array. This is useful for preparing data for transmission or storage in formats that require UTF-8 encoding.
"const { fromUtf8 } = require('@aws-sdk/util-utf8-node');
const utf8EncodedString = fromUtf8('Hello World');"
UTF-8 Decoding
Converts a UTF-8 encoded byte array back into a JavaScript string. This is useful for reading data that was stored or transmitted as UTF-8 encoded bytes.
"const { toUtf8 } = require('@aws-sdk/util-utf8-node');
const decodedString = toUtf8(utf8EncodedString);"
The 'text-encoding' package provides a polyfill for the Encoding Living Standard's API, offering broader encoding and decoding capabilities beyond UTF-8, including legacy encodings. It's more versatile than @aws-sdk/util-utf8-node but might be overkill for applications only needing UTF-8 support.
This package offers conversion between various character encodings, including UTF-8, in Node.js. Unlike @aws-sdk/util-utf8-node, which is focused on UTF-8 and designed for AWS SDK usage, iconv-lite supports a wide range of encodings, making it suitable for applications requiring conversion between various character sets.
Readme
Deprecated package
This internal package is deprecated in favor of @aws-sdk/util-utf8.
FAQs
A Node.JS UTF-8 string <-> UInt8Array converter
The npm package @aws-sdk/util-utf8-node receives a total of 2,115,333 weekly downloads. As such, @aws-sdk/util-utf8-node popularity was classified as popular.
We found that @aws-sdk/util-utf8-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
Company News
Come meet the Socket team at BSidesSF and RSA! We're sponsoring several fun networking events and we would love to see you there.
Security News
OSI is starting a conversation aimed at removing the excuse of the SaaS loophole for companies navigating licensing and the complexities of doing business with open source.