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

x-address-codec

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

x-address-codec - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

26

dist/npm/index.js

@@ -5,3 +5,2 @@ 'use strict';

/*eslint-disable no-unused-vars*/
var ALPHABETS = {

@@ -32,5 +31,15 @@ bitcoin: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz',

function buildCodecsMap(alphabets, Codec) {
var codecs = {};
for (var _name in ALPHABETS) {
codecs[_name] = new Codec(ALPHABETS[_name]);
}if (alphabets !== ALPHABETS) {
for (var _name2 in alphabets) {
codecs[_name2] = new Codec(alphabets[_name2]);
}
}
return codecs;
}
function apiFactory(options) {
var Codec = codecFactory(options);
var _options$alphabets = options.alphabets;

@@ -41,9 +50,8 @@ var alphabets = _options$alphabets === undefined ? ALPHABETS : _options$alphabets;

var _options$defaultAlphabet = options.defaultAlphabet;
var defaultAlphabet = _options$defaultAlphabet === undefined ? alphabets === ALPHABETS ? 'bitcoin' : Object.keys(alphabets)[0] : _options$defaultAlphabet;
var defaultAlphabet = _options$defaultAlphabet === undefined ? Object.keys(alphabets)[0] : _options$defaultAlphabet;
/*eslint-enable no-unused-vars*/
var codecs = {};
for (var _name in alphabets) {
codecs[_name] = new Codec(alphabets[_name]);
}return addMethods(codecMethods, {
var Codec = codecFactory(options);
var codecs = buildCodecsMap(alphabets, Codec);
return addMethods(codecMethods, {
Codec: Codec,

@@ -50,0 +58,0 @@ codecs: codecs,

{
"name": "x-address-codec",
"version": "0.3.2",
"version": "0.4.0",
"description": "crypto currency address codec",

@@ -5,0 +5,0 @@ "files": [

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