Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

base32url

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base32url

Base32 with URL-safe alphabet (thus Base32URL)

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
102
increased by104%
Maintainers
1
Weekly downloads
 
Created
Source

base32-url-js

Very simple extension to hi-base32 to encode/decode using URL-safe characters. Same idea of Base64URL, thus Base32URL.

Installation

Use this command to install:

npm install base32url

Usage

You could use like this:

If you use node.js, you should require the module first:

const Base32URL = require('base32url');

or import it

import * as Base32URL from 'base32url';

And then just call the functions when needed:

Base32URL.encode('String to encode');
Base32URL.decode([]]);

Methods

Base32URL.encode(input)

Encode string or bytes to base32url, set asciiOnly to true for better performace if it is.

input: String, Array, Uint8Array or ArrayBuffer

Input string or bytes to encode.

Base32URL.decode(base32Str)

Decode Base32URL string and return a byte array

base32Str: String

Base32URL string to decode.

Base32URL.decodeAsString(base32Str)

Decode Base32URL string and return a string

base32Str: String

Base32URL string to decode.

FAQs

Package last updated on 02 Jun 2021

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc