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

@trezor/utils

Package Overview
Dependencies
Maintainers
6
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trezor/utils - npm Package Compare versions

Comparing version 9.0.15 to 9.0.16

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# 9.0.16
- chore(connect): use `tslib` as dependency in all public libs (606ecc63b)
- chore: update `jest` and related dependency (b8a321c83)
- chore(repo): update tsx (53de3e3a8)
# 9.0.15

@@ -2,0 +8,0 @@

101

lib/index.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = 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) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.xssFilters = exports.versionUtils = exports.enumUtils = exports.bufferUtils = void 0;
__exportStar(require("./arrayDistinct"), exports);
__exportStar(require("./arrayPartition"), exports);
__exportStar(require("./arrayShuffle"), exports);
__exportStar(require("./arrayToDictionary"), exports);
exports.bufferUtils = __importStar(require("./bufferUtils"));
__exportStar(require("./bytesToHumanReadable"), exports);
__exportStar(require("./capitalizeFirstLetter"), exports);
__exportStar(require("./cloneObject"), exports);
__exportStar(require("./countBytesInString"), exports);
__exportStar(require("./createCooldown"), exports);
__exportStar(require("./createDeferred"), exports);
__exportStar(require("./createTimeoutPromise"), exports);
exports.enumUtils = __importStar(require("./enumUtils"));
__exportStar(require("./getNumberFromPixelString"), exports);
__exportStar(require("./getRandomNumberInRange"), exports);
__exportStar(require("./getSynchronize"), exports);
__exportStar(require("./getWeakRandomId"), exports);
__exportStar(require("./hasUppercaseLetter"), exports);
__exportStar(require("./isAscii"), exports);
__exportStar(require("./isHex"), exports);
__exportStar(require("./isNotUndefined"), exports);
__exportStar(require("./isUrl"), exports);
__exportStar(require("./mergeDeepObject"), exports);
__exportStar(require("./objectPartition"), exports);
__exportStar(require("./parseElectrumUrl"), exports);
__exportStar(require("./parseHostname"), exports);
__exportStar(require("./promiseAllSequence"), exports);
__exportStar(require("./redactUserPath"), exports);
__exportStar(require("./scheduleAction"), exports);
__exportStar(require("./throwError"), exports);
__exportStar(require("./truncateMiddle"), exports);
__exportStar(require("./topologicalSort"), exports);
__exportStar(require("./urlToOnion"), exports);
exports.versionUtils = __importStar(require("./versionUtils"));
exports.xssFilters = __importStar(require("./xssFilters"));
__exportStar(require("./getLocaleSeparators"), exports);
__exportStar(require("./addDashesToSpaces"), exports);
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./arrayDistinct"), exports);
tslib_1.__exportStar(require("./arrayPartition"), exports);
tslib_1.__exportStar(require("./arrayShuffle"), exports);
tslib_1.__exportStar(require("./arrayToDictionary"), exports);
exports.bufferUtils = tslib_1.__importStar(require("./bufferUtils"));
tslib_1.__exportStar(require("./bytesToHumanReadable"), exports);
tslib_1.__exportStar(require("./capitalizeFirstLetter"), exports);
tslib_1.__exportStar(require("./cloneObject"), exports);
tslib_1.__exportStar(require("./countBytesInString"), exports);
tslib_1.__exportStar(require("./createCooldown"), exports);
tslib_1.__exportStar(require("./createDeferred"), exports);
tslib_1.__exportStar(require("./createTimeoutPromise"), exports);
exports.enumUtils = tslib_1.__importStar(require("./enumUtils"));
tslib_1.__exportStar(require("./getNumberFromPixelString"), exports);
tslib_1.__exportStar(require("./getRandomNumberInRange"), exports);
tslib_1.__exportStar(require("./getSynchronize"), exports);
tslib_1.__exportStar(require("./getWeakRandomId"), exports);
tslib_1.__exportStar(require("./hasUppercaseLetter"), exports);
tslib_1.__exportStar(require("./isAscii"), exports);
tslib_1.__exportStar(require("./isHex"), exports);
tslib_1.__exportStar(require("./isNotUndefined"), exports);
tslib_1.__exportStar(require("./isUrl"), exports);
tslib_1.__exportStar(require("./mergeDeepObject"), exports);
tslib_1.__exportStar(require("./objectPartition"), exports);
tslib_1.__exportStar(require("./parseElectrumUrl"), exports);
tslib_1.__exportStar(require("./parseHostname"), exports);
tslib_1.__exportStar(require("./promiseAllSequence"), exports);
tslib_1.__exportStar(require("./redactUserPath"), exports);
tslib_1.__exportStar(require("./scheduleAction"), exports);
tslib_1.__exportStar(require("./throwError"), exports);
tslib_1.__exportStar(require("./truncateMiddle"), exports);
tslib_1.__exportStar(require("./topologicalSort"), exports);
tslib_1.__exportStar(require("./urlToOnion"), exports);
exports.versionUtils = tslib_1.__importStar(require("./versionUtils"));
exports.xssFilters = tslib_1.__importStar(require("./xssFilters"));
tslib_1.__exportStar(require("./getLocaleSeparators"), exports);
tslib_1.__exportStar(require("./addDashesToSpaces"), exports);
//# sourceMappingURL=index.js.map
"use strict";
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.objectPartition = void 0;
const tslib_1 = require("tslib");
const objectPartition = (obj, keys) => keys.reduce(([included, excluded], key) => {
const _a = excluded, _b = key, value = _a[_b], rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
const _a = excluded, _b = key, value = _a[_b], rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
return typeof value !== 'undefined'

@@ -18,0 +8,0 @@ ? [Object.assign(Object.assign({}, included), { [key]: value }), rest]

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.promiseAllSequence = void 0;
const promiseAllSequence = (actions) => __awaiter(void 0, void 0, void 0, function* () {
const tslib_1 = require("tslib");
const promiseAllSequence = (actions) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
const results = [];

@@ -15,0 +7,0 @@ for (let i = 0; i < actions.length; ++i) {

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.scheduleAction = void 0;
const tslib_1 = require("tslib");
const isArray = (attempts) => Array.isArray(attempts);

@@ -55,3 +47,3 @@ const abortedBySignal = () => new Error('Aborted by signal');

});
const resolveAction = (action, clear) => __awaiter(void 0, void 0, void 0, function* () {
const resolveAction = (action, clear) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
const aborter = new AbortController();

@@ -69,3 +61,3 @@ const onClear = () => aborter.abort();

});
const attemptLoop = (attempts, attempt, failure, clear) => __awaiter(void 0, void 0, void 0, function* () {
const attemptLoop = (attempts, attempt, failure, clear) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
for (let a = 0; a < attempts - 1; a++) {

@@ -90,3 +82,3 @@ if (clear.aborted)

});
const scheduleAction = (action, params) => __awaiter(void 0, void 0, void 0, function* () {
const scheduleAction = (action, params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
const { signal, delay, attempts, timeout, deadline, gap } = params;

@@ -93,0 +85,0 @@ const deadlineMs = deadline && deadline - Date.now();

{
"name": "@trezor/utils",
"version": "9.0.15",
"version": "9.0.16",
"author": "Trezor <info@trezor.io>",

@@ -33,5 +33,8 @@ "homepage": "https://github.com/trezor/trezor-suite/tree/develop/packages/utils",

"rimraf": "^5.0.5",
"tsx": "^3.14.0",
"tsx": "^4.6.2",
"typescript": "5.3.2"
},
"peerDependencies": {
"tslib": "^2.6.2"
}
}
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