🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@aws-sdk/util-base64

Package Overview
Dependencies
Maintainers
5
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/util-base64

A Base64 <-> UInt8Array converter

3.374.0
latest
Source
npm
Version published
Weekly downloads
829K
-8.7%
Maintainers
5
Weekly downloads
 
Created

What is @aws-sdk/util-base64?

@aws-sdk/util-base64 is a utility package provided by AWS SDK for JavaScript. It offers functions to encode and decode Base64 strings, which are commonly used in data encoding and transmission.

What are @aws-sdk/util-base64's main functionalities?

Base64 Encoding

This feature allows you to encode a string into Base64 format. The `toBase64` function takes a string as input and returns its Base64 encoded version.

const { toBase64 } = require('@aws-sdk/util-base64');
const data = 'Hello, World!';
const encodedData = toBase64(data);
console.log(encodedData); // Outputs: 'SGVsbG8sIFdvcmxkIQ=='

Base64 Decoding

This feature allows you to decode a Base64 encoded string back to its original format. The `fromBase64` function takes a Base64 encoded string as input and returns the decoded string.

const { fromBase64 } = require('@aws-sdk/util-base64');
const encodedData = 'SGVsbG8sIFdvcmxkIQ==';
const decodedData = fromBase64(encodedData);
console.log(decodedData); // Outputs: 'Hello, World!'

Other packages similar to @aws-sdk/util-base64

FAQs

Package last updated on 20 Jul 2023

Did you know?

Socket

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.

Install

Related posts