Socket
Socket
Sign inDemoInstall

@smithy/util-base64

Package Overview
Dependencies
4
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @smithy/util-base64

A Base64 <-> UInt8Array converter


Version published
Weekly downloads
10M
decreased by-0.39%
Maintainers
2
Install size
161 kB
Created
Weekly downloads
 

Package description

What is @smithy/util-base64?

The @smithy/util-base64 package provides utilities for encoding and decoding strings or binary data to and from Base64. It is designed to be a lightweight and efficient solution for handling Base64 encoding in JavaScript applications, particularly useful in contexts where manipulating binary data is necessary.

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

Encoding a string to Base64

This feature allows you to encode a plain string into its Base64 representation. It's particularly useful for encoding data that needs to be safely transmitted over a network or stored in a way that is not human-readable.

"use strict";
const { toBase64 } = require('@smithy/util-base64');
const encoded = toBase64('Hello, world!');
console.log(encoded); // Outputs: SGVsbG8sIHdvcmxkIQ==

Decoding a Base64 string

This feature enables the decoding of a Base64 encoded string back into its original string format. It's essential for retrieving the original data from a Base64 encoded string, especially when the data needs to be processed or displayed.

"use strict";
const { fromBase64 } = require('@smithy/util-base64');
const decoded = fromBase64('SGVsbG8sIHdvcmxkIQ==');
console.log(decoded); // Outputs: Hello, world!

Other packages similar to @smithy/util-base64

Readme

Source

@smithy/util-base64

NPM version NPM downloads

FAQs

Last updated on 14 Mar 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc