Socket
Socket
Sign inDemoInstall

@celo/base

Package Overview
Dependencies
Maintainers
21
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@celo/base - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0-alpha.1

LICENSE

1

lib/address.d.ts

@@ -0,1 +1,2 @@

/// <reference types="node" />
export declare type Address = string;

@@ -2,0 +3,0 @@ export declare const eqAddress: (a: Address, b: Address) => boolean;

2

lib/address.js

@@ -24,3 +24,3 @@ "use strict";

exports.trimLeading0x = trimLeading0x;
var ensureLeading0x = function (input) { return (input.startsWith('0x') ? input : "0x" + input); };
var ensureLeading0x = function (input) { return (input.startsWith('0x') ? input : "0x".concat(input)); };
exports.ensureLeading0x = ensureLeading0x;

@@ -27,0 +27,0 @@ // Turns '0xce10ce10ce10ce10ce10ce10ce10ce10ce10ce10'

@@ -33,3 +33,3 @@ import { Logger } from './logger';

*/
export declare const timeout: <T extends any[], U>(inFunction: InFunction<T, U>, params: T, timeoutMs: number, timeoutError: any, timeoutLogMsg?: string | null, logger?: Logger | null) => Promise<U>;
export declare const timeout: <T extends any[], U>(inFunction: InFunction<T, U>, params: T, timeoutMs: number, timeoutError: any, timeoutLogMsg?: string | null, logger?: Logger | null) => Promise<Awaited<U>>;
export {};

@@ -74,3 +74,3 @@ "use strict";

if (logger) {
logger(TAG + "/@retryAsync, Failed to execute function on try #" + i + ":", error_1);
logger("".concat(TAG, "/@retryAsync, Failed to execute function on try #").concat(i, ":"), error_1);
}

@@ -116,3 +116,3 @@ return [3 /*break*/, 6];

if (logger) {
logger(TAG + "/@retryAsync, Failed to execute function on try #" + i, error_2);
logger("".concat(TAG, "/@retryAsync, Failed to execute function on try #").concat(i), error_2);
}

@@ -159,3 +159,3 @@ return [3 /*break*/, 6];

if (logger) {
logger(TAG + "/@retryAsync, Failed to execute function on try #" + i, error_3);
logger("".concat(TAG, "/@retryAsync, Failed to execute function on try #").concat(i), error_3);
}

@@ -188,3 +188,3 @@ return [3 /*break*/, 5];

return __generator(this, function (_a) {
return [2 /*return*/, (0, exports.timeout)(exports.retryAsyncWithBackOff, [inFunction, tries, params, delayMs, factor, logger], timeoutMs, new Error("Timed out after " + timeoutMs + "ms"), TAG + "/@retryAsyncWithBackOffAndTimeout, Timed out after " + timeoutMs + "ms", logger)];
return [2 /*return*/, (0, exports.timeout)(exports.retryAsyncWithBackOff, [inFunction, tries, params, delayMs, factor, logger], timeoutMs, new Error("Timed out after ".concat(timeoutMs, "ms")), "".concat(TAG, "/@retryAsyncWithBackOffAndTimeout, Timed out after ").concat(timeoutMs, "ms"), logger)];
});

@@ -286,3 +286,3 @@ });

if (logger) {
logger(timeoutLogMsg || TAG + "/@timeout Timed out after " + timeoutMs + "ms");
logger(timeoutLogMsg || "".concat(TAG, "/@timeout Timed out after ").concat(timeoutMs, "ms"));
}

@@ -289,0 +289,0 @@ reject(timeoutError);

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

@@ -29,3 +29,3 @@ "use strict";

}
return logger.apply(void 0, __spreadArray([prefix + ":: "], args, false));
return logger.apply(void 0, __spreadArray(["".concat(prefix, ":: ")], args, false));
};

@@ -32,0 +32,0 @@ }

@@ -12,3 +12,3 @@ "use strict";

}
throw new Error("Unable to parse '" + inputString + "' as boolean");
throw new Error("Unable to parse '".concat(inputString, "' as boolean"));
};

@@ -15,0 +15,0 @@ exports.stringToBoolean = stringToBoolean;

@@ -8,8 +8,8 @@ export interface ParsedPhoneNumber {

}
export declare const getPhoneHash: (sha3: (a: string) => string | null, phoneNumber: string, salt?: string | undefined) => string;
export declare const getPhoneHash: (sha3: (a: string) => string | null, phoneNumber: string, salt?: string) => string;
export declare function isE164Number(phoneNumber: string): boolean;
export declare function anonymizedPhone(phoneNumber: string): string;
export declare const PhoneNumberBase: {
getPhoneHash: (sha3: (a: string) => string | null, phoneNumber: string, salt?: string | undefined) => string;
getPhoneHash: (sha3: (a: string) => string | null, phoneNumber: string, salt?: string) => string;
isE164Number: typeof isE164Number;
};

@@ -99,3 +99,3 @@ "use strict";

err_1 = _a.sent();
logger("Failed with error: " + err_1.message);
logger("Failed with error: ".concat(err_1.message));
logger(err_1);

@@ -102,0 +102,0 @@ return [3 /*break*/, 5];

{
"name": "@celo/base",
"version": "2.1.0",
"version": "2.2.0-alpha.1",
"description": "Celo base common utils, no dependencies",

@@ -5,0 +5,0 @@ "author": "Celo",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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