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

basex-encoder

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basex-encoder

Encode / decode any base X to and from string or buffer

  • 0.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
429
decreased by-53.27%
Maintainers
1
Weekly downloads
 
Created
Source

BaseX Encoder

BaseX Encoder is encoder / decoder for any base X. It can encode / decode to and from string and buffer

Build Status Coverage Status npm version Dependency Status License

+ Written in TypeScript

+ 0 dependencies

Getting Started

First, install BaseX Encoder using npm.

npm install --save basex-encoder
# or
yarn add basex-encoder

Note: BaseX Encoder assumes a JavaScript environment with global Buffer. Use safe-buffer to polyfill.

import { encoder } from 'basex-encoder';

const base58 = encoder('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz');

// or
const base6 = encoder('abcdef', 'utf8');

// encode from string to string
const encoded = base58.encode('text to encode');

// decode from string to string
const decoded = base58.decode(encoded);

// encode from buffer to string
const encoded = base58.encodeFromBuffer(rawBuffer);

// decode from string to buffer
const decodedBuffer = base58.decodeToBuffer(encoded);

Keywords

FAQs

Package last updated on 11 Jul 2019

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