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

@collabland/common

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@collabland/common - npm Package Compare versions

Comparing version 0.23.2 to 0.24.0

34

dist/utils/jsonata.js

@@ -76,2 +76,34 @@ "use strict";

};
function _add(a, b) {
debug('$add(%s,%s)', a, b);
a = a !== null && a !== void 0 ? a : '0';
b = b !== null && b !== void 0 ? b : '0';
if (typeof a === 'bigint' || (typeof a === 'object' && !(a instanceof bn_js_1.default))) {
a = a.toString();
}
if (typeof b === 'bigint' || (typeof b === 'object' && !(b instanceof bn_js_1.default))) {
b = b.toString();
}
return new bn_js_1.default(a !== null && a !== void 0 ? a : 0).add(new bn_js_1.default(b !== null && b !== void 0 ? b : 0));
}
function _sub(a, b) {
debug('$sub(%s,%s)', a, b);
a = a !== null && a !== void 0 ? a : '0';
b = b !== null && b !== void 0 ? b : '0';
if (typeof a === 'bigint' || (typeof a === 'object' && !(a instanceof bn_js_1.default))) {
a = a.toString();
}
if (typeof b === 'bigint' || (typeof b === 'object' && !(b instanceof bn_js_1.default))) {
b = b.toString();
}
return new bn_js_1.default(a !== null && a !== void 0 ? a : 0).sub(new bn_js_1.default(b !== null && b !== void 0 ? b : 0));
}
const add = {
implementation: _add,
signature: '<(snlo)(snlo):o>',
};
const sub = {
implementation: _sub,
signature: '<(snlo)(snlo):o>',
};
function compare(a, b) {

@@ -171,2 +203,4 @@ debug('$compare(%O,%O)', a, b);

lte,
add,
sub,
toString, // This is different from $string() which uses JSON.stringify

@@ -173,0 +207,0 @@ };

4

package.json
{
"name": "@collabland/common",
"version": "0.23.2",
"version": "0.24.0",
"description": "CollabLand common utilities",

@@ -62,3 +62,3 @@ "main": "dist/index.js",

"author": "Abridged, Inc.",
"gitHead": "e5ad9ea01438af9dc8fcb8a2690cb9a27b052fde"
"gitHead": "bc079a4c43e8b849abc563b3ff5841b25fdf7028"
}

@@ -95,2 +95,38 @@ // Copyright Abridged, Inc. 2021. All Rights Reserved.

function _add(a: BNLike, b: BNLike) {
debug('$add(%s,%s)', a, b);
a = a ?? '0';
b = b ?? '0';
if (typeof a === 'bigint' || (typeof a === 'object' && !(a instanceof BN))) {
a = a.toString();
}
if (typeof b === 'bigint' || (typeof b === 'object' && !(b instanceof BN))) {
b = b.toString();
}
return new BN(a ?? 0).add(new BN(b ?? 0));
}
function _sub(a: BNLike, b: BNLike) {
debug('$sub(%s,%s)', a, b);
a = a ?? '0';
b = b ?? '0';
if (typeof a === 'bigint' || (typeof a === 'object' && !(a instanceof BN))) {
a = a.toString();
}
if (typeof b === 'bigint' || (typeof b === 'object' && !(b instanceof BN))) {
b = b.toString();
}
return new BN(a ?? 0).sub(new BN(b ?? 0));
}
const add: JsonQueryFunction = {
implementation: _add,
signature: '<(snlo)(snlo):o>',
};
const sub: JsonQueryFunction = {
implementation: _sub,
signature: '<(snlo)(snlo):o>',
};
function compare(a: BNLike, b: BNLike) {

@@ -199,2 +235,4 @@ debug('$compare(%O,%O)', a, b);

lte,
add,
sub,
toString, // This is different from $string() which uses JSON.stringify

@@ -201,0 +239,0 @@ };

Sorry, the diff of this file is not supported yet

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