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

@ledgerhq/live-network

Package Overview
Dependencies
Maintainers
7
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ledgerhq/live-network - npm Package Compare versions

Comparing version 1.1.13 to 1.2.0-nightly.0

6

CHANGELOG.md
# @ledgerhq/live-network
## 1.2.0-nightly.0
### Minor Changes
- [#6172](https://github.com/LedgerHQ/ledger-live/pull/6172) [`7fb3eb2`](https://github.com/LedgerHQ/ledger-live/commit/7fb3eb266acdca143c94d2fce74329809ebfbb79) Thanks [@sprohaszka-ledger](https://github.com/sprohaszka-ledger)! - Remove API injection in coin-module
## 1.1.13

@@ -4,0 +10,0 @@

4

lib-es/cache.d.ts
import LRU from "lru-cache";
export type CacheOptions = LRU.Options<string, unknown>;
export declare function seconds(num: number, max?: number): CacheOptions;
export declare function minutes(num: number, max?: number): CacheOptions;
export declare function hours(num: number, max?: number): CacheOptions;
export type CacheRes<A extends Array<any>, T> = {

@@ -3,0 +7,0 @@ (...args: A): Promise<T>;

import LRU from "lru-cache";
export function seconds(num, max = 100) {
return {
max,
ttl: num * 1000,
};
}
export function minutes(num, max = 100) {
return seconds(num * 60, max);
}
export function hours(num, max = 100) {
return minutes(num * 60, max);
}
/**

@@ -3,0 +15,0 @@ * Creates an LRU cache function that wraps the given async function `f`.

import LRU from "lru-cache";
export type CacheOptions = LRU.Options<string, unknown>;
export declare function seconds(num: number, max?: number): CacheOptions;
export declare function minutes(num: number, max?: number): CacheOptions;
export declare function hours(num: number, max?: number): CacheOptions;
export type CacheRes<A extends Array<any>, T> = {

@@ -3,0 +7,0 @@ (...args: A): Promise<T>;

@@ -6,4 +6,19 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.makeLRUCache = void 0;
exports.makeLRUCache = exports.hours = exports.minutes = exports.seconds = void 0;
const lru_cache_1 = __importDefault(require("lru-cache"));
function seconds(num, max = 100) {
return {
max,
ttl: num * 1000,
};
}
exports.seconds = seconds;
function minutes(num, max = 100) {
return seconds(num * 60, max);
}
exports.minutes = minutes;
function hours(num, max = 100) {
return minutes(num * 60, max);
}
exports.hours = hours;
/**

@@ -10,0 +25,0 @@ * Creates an LRU cache function that wraps the given async function `f`.

2

package.json
{
"name": "@ledgerhq/live-network",
"version": "1.1.13",
"version": "1.2.0-nightly.0",
"description": "Ledger Live network and cache utilities",

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

import LRU from "lru-cache";
export type CacheOptions = LRU.Options<string, unknown>; //{ max: number; ttl: number };
export function seconds(num: number, max = 100): CacheOptions {
return {
max,
ttl: num * 1000,
};
}
export function minutes(num: number, max = 100): CacheOptions {
return seconds(num * 60, max);
}
export function hours(num: number, max = 100): CacheOptions {
return minutes(num * 60, max);
}
export type CacheRes<A extends Array<any>, T> = {

@@ -4,0 +18,0 @@ (...args: A): Promise<T>;

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