Socket
Socket
Sign inDemoInstall

universal-base64url

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

universal-base64url

Small universal base64url functions for node.js and browsers


Version published
Weekly downloads
17K
increased by0.14%
Maintainers
1
Weekly downloads
 
Created
Source

Universal Base64 URL

NPM version NPM downloads Build status Test coverage

Small universal base64url functions for node.js and browsers.

This is a small wrapper around universal-base64 to support URL-safe base64 in node.js and browsers.

Installation

npm install universal-base64url --save

Usage

import { decode, encode } from 'universal-base64url'

encode('test') //=> "dGVzdA"
decode('dGVzdA') //=> "test"

TypeScript

This module uses TypeScript and contains type definitions on NPM.

As of October 2018, https://github.com/brianloveswords/base64url exists but is using the node.js Buffer API, instead of falling back on atob/btoa in browsers. It also has some issues with TypeScript definitions (includes node.js types in browser) and old browser compatibility. This libraries API is smaller and simplier to avoid these problems.

License

Apache 2.0

Keywords

FAQs

Package last updated on 08 Oct 2018

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