init
This commit is contained in:
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
import { RJSVM, RJSVM_Config, RJSVM_Implementations, Function_Map, Endpoints_Of, State_Of, Generic_Ctor_ReturnType } from "./types";
|
||||
export declare abstract class RJSVM_Builder {
|
||||
static from<Base_Ctor extends (new (...args: any) => RJSVM<State_T, Endpoints_T>) | (abstract new (...args: any) => RJSVM<State_T, Endpoints_T>), Impl extends RJSVM_Implementations<any, Endpoints_T>, Endpoints_T extends Function_Map = Endpoints_Of<Generic_Ctor_ReturnType<Base_Ctor>>, State_T = State_Of<Generic_Ctor_ReturnType<Base_Ctor>>>(Base: Base_Ctor, defs: Impl): (new (config: RJSVM_Config) => RJSVM<State_T, Endpoints_T>);
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.RJSVM_Builder = void 0;
|
||||
const types_1 = require("./types");
|
||||
const xrpl_1 = require("xrpl");
|
||||
const xrpio_1 = require("xrpio");
|
||||
const dataparser_1 = require("../../util/dataparser");
|
||||
const protocol_constants_1 = require("../../util/protocol.constants");
|
||||
class RJSVM_Builder {
|
||||
static from(Base, defs) {
|
||||
return class RJSVM_Runnable extends Base {
|
||||
config;
|
||||
sync_block_height = -1;
|
||||
rippleApi;
|
||||
xrpIO;
|
||||
definitions;
|
||||
constructor(config) {
|
||||
super();
|
||||
this.config = config;
|
||||
if (!protocol_constants_1.XRP_ADDRESS.test(this.owner)) {
|
||||
throw new Error(`Inavlid owner address ${this.owner}`);
|
||||
}
|
||||
this.definitions = Object.freeze(defs);
|
||||
Object.entries(this.definitions).forEach(([k, v]) => {
|
||||
this[k] = (env, ...args) => v.implementation.apply(this, [env, ...args]);
|
||||
});
|
||||
}
|
||||
connect = async () => {
|
||||
this.rippleApi = new xrpl_1.Client(this.config.rippleNode);
|
||||
await this.rippleApi.connect();
|
||||
this.xrpIO = new xrpio_1.xrpIO(this.config.rippleNode);
|
||||
await this.xrpIO.connect();
|
||||
await this.sync();
|
||||
this.rippleApi.on('ledgerClosed', (ledger) => {
|
||||
/*
|
||||
console.log("---- Ledger ----")
|
||||
console.log("index",ledger.ledger_index)
|
||||
console.log("hash", ledger.ledger_hash)
|
||||
console.log("---- /Ledger ----")
|
||||
*/
|
||||
});
|
||||
await this.rippleApi.request({
|
||||
command: 'subscribe',
|
||||
streams: ['ledger']
|
||||
});
|
||||
};
|
||||
handlePayload = async (tx, payload) => {
|
||||
if (!(payload.endpoint in this.definitions)) {
|
||||
return;
|
||||
}
|
||||
const endpointDef = this.definitions[payload.endpoint];
|
||||
if (endpointDef.visibility === 'owner' && tx.Account !== this.owner) {
|
||||
console.log(`owner restricted endpoint "${payload.endpoint}" called from ${tx.hash}. But ${tx.Account} != ${this.owner}`);
|
||||
return;
|
||||
}
|
||||
if (endpointDef.fee && Number(tx.Amount) < endpointDef.fee) {
|
||||
console.log(`Insufficient fee ${tx.hash}. Required ${endpointDef.fee}, was ${tx.Amount}`);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const data = await this.xrpIO.treeRead([payload.data], tx.Account);
|
||||
const jsonData = JSON.parse(data);
|
||||
endpointDef.parameterSchema.parse(jsonData);
|
||||
this[payload.endpoint].apply(this, [tx, jsonData]);
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
return;
|
||||
}
|
||||
};
|
||||
parseMemos = async (tx, memos) => {
|
||||
memos
|
||||
.map((memo) => {
|
||||
if (!memo.Memo || !memo.Memo.MemoData) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const data = dataparser_1.DataParser.hex_to_ascii(memo.Memo.MemoData);
|
||||
return JSON.parse(data);
|
||||
}
|
||||
catch (e) {
|
||||
return;
|
||||
}
|
||||
})
|
||||
.filter((data) => data != undefined)
|
||||
.forEach(payload => {
|
||||
try {
|
||||
const parsedPayload = types_1.payloadSchema.parse(payload);
|
||||
this.handlePayload(tx, parsedPayload);
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
});
|
||||
};
|
||||
sync = async (marker) => {
|
||||
//If `forward` is set to true, returns values indexed with the oldest ledger first.
|
||||
//Otherwise, the results are indexed with the newest ledger first.
|
||||
//(Each page of results may not be internally ordered, but the pages are overall ordered.)
|
||||
const resp = await this.rippleApi.request({
|
||||
command: "account_tx",
|
||||
account: this.config.listeningAddress,
|
||||
forward: true,
|
||||
ledger_index_min: this.sync_block_height,
|
||||
marker: marker,
|
||||
});
|
||||
//results may not be ordered, so sort them
|
||||
const raw_txs = resp.result.transactions
|
||||
.sort((a, b) => a.tx.ledger_index - b.tx.ledger_index)
|
||||
.map((entry) => entry.tx);
|
||||
//apply any state changes
|
||||
await Promise.all(raw_txs.map((tx) => this.parseMemos(tx, tx.Memos)));
|
||||
//if marker is present the result is paginated.
|
||||
//re-run the same request with the marker included
|
||||
if (resp.result.marker) {
|
||||
await this.sync(resp.result.marker);
|
||||
}
|
||||
else {
|
||||
//presence of no marker means we caught up to current block height
|
||||
this.sync_block_height = resp.result.ledger_index_max + 1;
|
||||
//schedule the next sync
|
||||
setTimeout(this.sync, 10000);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
exports.RJSVM_Builder = RJSVM_Builder;
|
||||
Vendored
+67
@@ -0,0 +1,67 @@
|
||||
import { z } from "zod";
|
||||
export declare abstract class RJSVM<State_T = any, Definitions_T extends Function_Map = Function_Map> {
|
||||
owner: string;
|
||||
state: State_T;
|
||||
sync_block_height: number;
|
||||
config: RJSVM_Config;
|
||||
definitions: RJSVM_Implementations<any, Definitions_T>;
|
||||
connect: () => Promise<void>;
|
||||
}
|
||||
export type Generic_Ctor_ReturnType<Ctor> = Ctor extends new (...args: any) => infer T ? T : Ctor extends abstract new (...args: any) => infer A ? A : never;
|
||||
export type State_Of<T extends RJSVM<any>> = T extends RJSVM<infer State_T> ? State_T : any;
|
||||
export type Endpoints_Of<T extends RJSVM<any, any>> = T extends RJSVM<any, infer Endpoints_T> ? Endpoints_T : any;
|
||||
export type PaymentTx_T = {
|
||||
Account: string;
|
||||
Amount: string;
|
||||
Destination: string;
|
||||
Fee: string;
|
||||
Flags: number;
|
||||
LastLedgerSequence: number;
|
||||
Memos: any[];
|
||||
Sequence: number;
|
||||
SigningPubKey: string;
|
||||
TransactionType: 'Payment';
|
||||
TxnSignature: string;
|
||||
date: number;
|
||||
hash: string;
|
||||
inLedger: number;
|
||||
ledger_index: number;
|
||||
};
|
||||
export type ParameterizedFunction = (...args: any) => void;
|
||||
export type Function_Map = {
|
||||
[K in string]: ParameterizedFunction;
|
||||
};
|
||||
export type RJSVM_Endpoint<RJSVM_T extends RJSVM<any, Definitions_T>, Definitions_T extends Function_Map = Endpoints_Of<RJSVM_T>, Impl extends RJSVM_EndpointHandler<RJSVM_T, Definitions_T, ParameterizedFunction> = RJSVM_EndpointHandler<RJSVM_T, Definitions_T, ParameterizedFunction>> = {
|
||||
implementation: Impl;
|
||||
visibility: 'owner' | 'public';
|
||||
fee?: number;
|
||||
parameterSchema: z.Schema;
|
||||
};
|
||||
export type RJSVM_Implementations<RJSVM_T extends RJSVM<any, Definitions>, Definitions extends Function_Map = Endpoints_Of<RJSVM_T>> = {
|
||||
[Key in keyof Definitions]: RJSVM_Endpoint<RJSVM_T, Definitions, RJSVM_EndpointHandler<RJSVM_T, Definitions, Definitions[Key]>>;
|
||||
};
|
||||
export type RJSVM_EndpointHandler<RJSVM_T extends RJSVM<any, Definitions_T>, Definitions_T extends Function_Map = Endpoints_Of<RJSVM_T>, Fn extends ParameterizedFunction = ParameterizedFunction> = (this: RJSVM_T & RJSVM_Interface<RJSVM_T, State_Of<RJSVM_T>, Definitions_T>, env: PaymentTx_T, ...args: Parameters<Fn>) => void;
|
||||
export type RJSVM_Interface<RJSVM_T extends RJSVM<State_T, Definitions_T>, State_T = State_Of<RJSVM_T>, Definitions_T extends Function_Map = Endpoints_Of<RJSVM_T>> = {
|
||||
state: State_T;
|
||||
} & {
|
||||
[K in keyof Definitions_T]?: RJSVM_EndpointHandler<RJSVM_T, Definitions_T, Definitions_T[K]>;
|
||||
};
|
||||
export type RJSVM_InitState<State_T> = {
|
||||
owner: string;
|
||||
state: State_T;
|
||||
};
|
||||
export type RJSVM_Config = {
|
||||
rippleNode: string;
|
||||
listeningAddress: string;
|
||||
};
|
||||
export declare const payloadSchema: z.ZodObject<{
|
||||
endpoint: z.ZodString;
|
||||
data: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
endpoint?: string;
|
||||
data?: string;
|
||||
}, {
|
||||
endpoint?: string;
|
||||
data?: string;
|
||||
}>;
|
||||
export type Payload = z.infer<typeof payloadSchema>;
|
||||
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.payloadSchema = exports.RJSVM = void 0;
|
||||
const zod_1 = require("zod");
|
||||
class RJSVM {
|
||||
owner;
|
||||
state;
|
||||
sync_block_height;
|
||||
config;
|
||||
definitions;
|
||||
connect;
|
||||
}
|
||||
exports.RJSVM = RJSVM;
|
||||
exports.payloadSchema = zod_1.z.object({
|
||||
endpoint: zod_1.z.string(),
|
||||
data: zod_1.z.string()
|
||||
});
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
type Wallet = {
|
||||
address: string;
|
||||
secret: string;
|
||||
};
|
||||
type DatawriterConfig = {
|
||||
receiveAddress: string;
|
||||
sendWallet: Wallet;
|
||||
xrpNode: string;
|
||||
};
|
||||
export declare class Datawriter {
|
||||
private config;
|
||||
constructor(config: DatawriterConfig);
|
||||
callEndpoint(endpointName: string, contractAddress: string, parameter: any, fee?: number): Promise<void>;
|
||||
}
|
||||
export {};
|
||||
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Datawriter = void 0;
|
||||
const xrpio_1 = require("xrpio");
|
||||
class Datawriter {
|
||||
config;
|
||||
constructor(config) {
|
||||
this.config = config;
|
||||
}
|
||||
async callEndpoint(endpointName, contractAddress, parameter, fee) {
|
||||
const xrpio = new xrpio_1.xrpIO(this.config.xrpNode);
|
||||
await xrpio.connect();
|
||||
try {
|
||||
const dataHash = await xrpio.treeWrite(JSON.stringify(parameter), this.config.receiveAddress, this.config.sendWallet.secret);
|
||||
await xrpio.writeRaw({
|
||||
data: JSON.stringify({
|
||||
endpoint: endpointName,
|
||||
data: dataHash
|
||||
})
|
||||
}, contractAddress, this.config.sendWallet.secret, undefined, fee ? String(fee) : undefined);
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
finally {
|
||||
await xrpio.disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Datawriter = Datawriter;
|
||||
(async () => {
|
||||
const owner_dw = new Datawriter({
|
||||
receiveAddress: "rDuXvMYNCEJCYDMFQykcafXhgi2NvMWqR",
|
||||
sendWallet: {
|
||||
address: "rUsPfG1hn6w6is28p5FUDWdMwvCo1iHrYq",
|
||||
secret: "sEdTMicaTVmfsVMLhxrufyAzEQSnsaP"
|
||||
},
|
||||
xrpNode: "wss://s.altnet.rippletest.net:51233"
|
||||
});
|
||||
//await owner_dw.callEndpoint('submit', 'rLaXUiYvW1EMns69PsAfwSLb2VgNtPpZwq', { title: "1", body: "2", from: "3" }, 100)
|
||||
const user_dw = new Datawriter({
|
||||
receiveAddress: "rwqCiEr3SLF43rAduhCChkR2K1XDhiqx5g",
|
||||
sendWallet: {
|
||||
address: "rHWN4X3hbodryX8H1EoPvmMV7AFHngEiBe",
|
||||
secret: "sEdTdLPWvz69UAUmt1zYijTyWheER9u"
|
||||
},
|
||||
xrpNode: "wss://s.altnet.rippletest.net:51233"
|
||||
});
|
||||
//await owner_dw.callEndpoint('submit', 'rLaXUiYvW1EMns69PsAfwSLb2VgNtPpZwq', { title: "1", body: "2", from: "3" }, 100)
|
||||
//await user_dw.callEndpoint('restricted', 'rLaXUiYvW1EMns69PsAfwSLb2VgNtPpZwq', { title: "user", body: "user", from: "user" })
|
||||
//await owner_dw.callEndpoint('restricted', 'rLaXUiYvW1EMns69PsAfwSLb2VgNtPpZwq', { title: "owner", body: "owner", from: "owner" })
|
||||
await user_dw.callEndpoint('setTns', 'rLaXUiYvW1EMns69PsAfwSLb2VgNtPpZwq', { hash: '01708abcF00636CE10E191FD782DBDC8F4076F28404BD88EBC31DE42DD084C0944B', name: 'test' });
|
||||
})();
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
export * from "./RJSVM/framework/rjsvm";
|
||||
export * from "./RJSVM/framework/types";
|
||||
export * from "./util/dataparser";
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
"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 __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);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./RJSVM/framework/rjsvm"), exports);
|
||||
__exportStar(require("./RJSVM/framework/types"), exports);
|
||||
__exportStar(require("./util/dataparser"), exports);
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const zod_1 = require("zod");
|
||||
const types_1 = require("./RJSVM/framework/types");
|
||||
const main_1 = require("./main");
|
||||
const schemas_1 = require("./util/schemas");
|
||||
const shoutSchema = zod_1.z.object({
|
||||
title: zod_1.z.string(),
|
||||
body: zod_1.z.string(),
|
||||
from: zod_1.z.string(),
|
||||
id: zod_1.z.optional(zod_1.z.string())
|
||||
});
|
||||
const tnsEntrySchema = zod_1.z.object({
|
||||
hash: schemas_1.xrp_transaction_hash_schema,
|
||||
name: zod_1.z.string(),
|
||||
});
|
||||
class RJSVM_Base extends types_1.RJSVM {
|
||||
owner = "rUsPfG1hn6w6is28p5FUDWdMwvCo1iHrYq";
|
||||
state = {
|
||||
shouts: []
|
||||
};
|
||||
}
|
||||
const RJSVM_Contract = {
|
||||
submit: {
|
||||
implementation: function (env, shout) {
|
||||
this.state.shouts.unshift(shout);
|
||||
console.log(shout);
|
||||
},
|
||||
visibility: 'public',
|
||||
fee: 10,
|
||||
parameterSchema: shoutSchema
|
||||
},
|
||||
restricted: {
|
||||
implementation: function (env, shout) {
|
||||
this.state.shouts.unshift(shout);
|
||||
console.log(shout);
|
||||
},
|
||||
visibility: 'owner',
|
||||
parameterSchema: shoutSchema
|
||||
},
|
||||
setTns: {
|
||||
implementation: function (env, tnsEntry) {
|
||||
console.log(tnsEntry);
|
||||
},
|
||||
visibility: 'public',
|
||||
parameterSchema: tnsEntrySchema,
|
||||
}
|
||||
};
|
||||
const Rjsvm = main_1.RJSVM_Builder.from(RJSVM_Base, RJSVM_Contract);
|
||||
const conf = {
|
||||
listeningAddress: "rLaXUiYvW1EMns69PsAfwSLb2VgNtPpZwq",
|
||||
rippleNode: "wss://s.altnet.rippletest.net:51233"
|
||||
};
|
||||
const rjsvm = new Rjsvm(conf);
|
||||
rjsvm.connect();
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
export declare class DataParser {
|
||||
static hex_to_ascii(input: any): string;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DataParser = void 0;
|
||||
class DataParser {
|
||||
static hex_to_ascii(input) {
|
||||
var hex = input.toString();
|
||||
var str = '';
|
||||
for (var n = 0; n < hex.length; n += 2) {
|
||||
str += String.fromCharCode(parseInt(hex.substr(n, 2), 16));
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
exports.DataParser = DataParser;
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
export declare const MSG_DELIM: string;
|
||||
export declare const MSG_DATA_MAX: number;
|
||||
export declare const PUBKEY_LEN: number;
|
||||
export declare const NON_ZERO_TX_HASH: RegExp;
|
||||
export declare const PTR_FORMAT: RegExp;
|
||||
export declare const DATA_FORMAT: RegExp;
|
||||
export declare const SIGNATURE_FORMAT: RegExp;
|
||||
export declare const SIGNER_FORMAT: RegExp;
|
||||
export declare const MSG_FORMAT: RegExp;
|
||||
export declare const AMOUNT_DECIMALS = 18;
|
||||
export declare const MAX_SUPPLY = 20000000;
|
||||
export declare const AMOUNT_FORMAT: RegExp;
|
||||
export declare const MIN_XRP_FEE = "0.00001";
|
||||
export declare const MIN_XRP_TX_VALUE = "0.000001";
|
||||
export declare const XRP_ADDRESS: RegExp;
|
||||
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.XRP_ADDRESS = exports.MIN_XRP_TX_VALUE = exports.MIN_XRP_FEE = exports.AMOUNT_FORMAT = exports.MAX_SUPPLY = exports.AMOUNT_DECIMALS = exports.MSG_FORMAT = exports.SIGNER_FORMAT = exports.SIGNATURE_FORMAT = exports.DATA_FORMAT = exports.PTR_FORMAT = exports.NON_ZERO_TX_HASH = exports.PUBKEY_LEN = exports.MSG_DATA_MAX = exports.MSG_DELIM = void 0;
|
||||
exports.MSG_DELIM = ' ';
|
||||
exports.MSG_DATA_MAX = 925;
|
||||
exports.PUBKEY_LEN = 66;
|
||||
exports.NON_ZERO_TX_HASH = new RegExp(`[0-9A-F]{64}`);
|
||||
exports.PTR_FORMAT = new RegExp(`^((${exports.NON_ZERO_TX_HASH.source})|0)`);
|
||||
exports.DATA_FORMAT = new RegExp(`(.{1,${exports.MSG_DATA_MAX}})`);
|
||||
exports.SIGNATURE_FORMAT = new RegExp(`(\\S{140}|\\S{142})$`);
|
||||
exports.SIGNER_FORMAT = new RegExp(`(\\S{${exports.PUBKEY_LEN}})`);
|
||||
exports.MSG_FORMAT = new RegExp(`${exports.PTR_FORMAT.source}${exports.MSG_DELIM}${exports.DATA_FORMAT.source}`, 'm');
|
||||
exports.AMOUNT_DECIMALS = 18;
|
||||
exports.MAX_SUPPLY = 20_000_000;
|
||||
exports.AMOUNT_FORMAT = new RegExp(`\d+(\.\d{1,${exports.AMOUNT_DECIMALS}})?`);
|
||||
exports.MIN_XRP_FEE = "0.00001";
|
||||
exports.MIN_XRP_TX_VALUE = "0.000001";
|
||||
exports.XRP_ADDRESS = new RegExp(`^([r])([1-9A-HJ-NP-Za-km-z]{24,34})`);
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
import { z } from "zod";
|
||||
export declare const xrp_address_schema: z.ZodString;
|
||||
export declare const xrp_transaction_hash_schema: z.ZodString;
|
||||
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.xrp_transaction_hash_schema = exports.xrp_address_schema = void 0;
|
||||
const zod_1 = require("zod");
|
||||
const protocol_constants_1 = require("./protocol.constants");
|
||||
const xrpio_1 = require("xrpio");
|
||||
exports.xrp_address_schema = zod_1.z.string().regex(protocol_constants_1.XRP_ADDRESS, "Not a valid XRP address");
|
||||
exports.xrp_transaction_hash_schema = zod_1.z.string().regex(xrpio_1.NON_ZERO_TX_HASH, "Not a valid XRP transaction hash");
|
||||
+1
@@ -0,0 +1 @@
|
||||
../sha.js/bin.js
|
||||
+1
@@ -0,0 +1 @@
|
||||
../typescript/bin/tsc
|
||||
+1
@@ -0,0 +1 @@
|
||||
../typescript/bin/tsserver
|
||||
+904
@@ -0,0 +1,904 @@
|
||||
{
|
||||
"name": "rjsvm",
|
||||
"version": "0.1.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"node_modules/@types/lodash": {
|
||||
"version": "4.14.189",
|
||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.189.tgz",
|
||||
"integrity": "sha512-kb9/98N6X8gyME9Cf7YaqIMvYGnBSWqEci6tiettE6iJWH1XdJz/PO8LB0GtLCG7x8dU3KWhZT+lA1a35127tA=="
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.11.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
|
||||
"integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg=="
|
||||
},
|
||||
"node_modules/@types/ws": {
|
||||
"version": "7.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz",
|
||||
"integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/assert": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz",
|
||||
"integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==",
|
||||
"dependencies": {
|
||||
"es6-object-assign": "^1.1.0",
|
||||
"is-nan": "^1.2.1",
|
||||
"object-is": "^1.0.1",
|
||||
"util": "^0.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/available-typed-arrays": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
|
||||
"integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/base-x": {
|
||||
"version": "3.0.9",
|
||||
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz",
|
||||
"integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==",
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/base64-js": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/big-integer": {
|
||||
"version": "1.6.51",
|
||||
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
|
||||
"integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==",
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/bignumber.js": {
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz",
|
||||
"integrity": "sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bip32": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz",
|
||||
"integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==",
|
||||
"dependencies": {
|
||||
"@types/node": "10.12.18",
|
||||
"bs58check": "^2.1.1",
|
||||
"create-hash": "^1.2.0",
|
||||
"create-hmac": "^1.1.7",
|
||||
"tiny-secp256k1": "^1.1.3",
|
||||
"typeforce": "^1.11.5",
|
||||
"wif": "^2.0.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bip32/node_modules/@types/node": {
|
||||
"version": "10.12.18",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
|
||||
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
|
||||
},
|
||||
"node_modules/bip39": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.4.tgz",
|
||||
"integrity": "sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw==",
|
||||
"dependencies": {
|
||||
"@types/node": "11.11.6",
|
||||
"create-hash": "^1.1.0",
|
||||
"pbkdf2": "^3.0.9",
|
||||
"randombytes": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/bip39/node_modules/@types/node": {
|
||||
"version": "11.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz",
|
||||
"integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ=="
|
||||
},
|
||||
"node_modules/bn.js": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz",
|
||||
"integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ=="
|
||||
},
|
||||
"node_modules/brorand": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
|
||||
"integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w=="
|
||||
},
|
||||
"node_modules/bs58": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
|
||||
"integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
|
||||
"dependencies": {
|
||||
"base-x": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/bs58check": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz",
|
||||
"integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==",
|
||||
"dependencies": {
|
||||
"bs58": "^4.0.0",
|
||||
"create-hash": "^1.1.0",
|
||||
"safe-buffer": "^5.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
||||
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1",
|
||||
"get-intrinsic": "^1.0.2"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/cipher-base": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
|
||||
"integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.1",
|
||||
"safe-buffer": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/create-hash": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
|
||||
"integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
|
||||
"dependencies": {
|
||||
"cipher-base": "^1.0.1",
|
||||
"inherits": "^2.0.1",
|
||||
"md5.js": "^1.3.4",
|
||||
"ripemd160": "^2.0.1",
|
||||
"sha.js": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/create-hmac": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
|
||||
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
|
||||
"dependencies": {
|
||||
"cipher-base": "^1.0.3",
|
||||
"create-hash": "^1.1.0",
|
||||
"inherits": "^2.0.1",
|
||||
"ripemd160": "^2.0.0",
|
||||
"safe-buffer": "^5.0.1",
|
||||
"sha.js": "^2.4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
|
||||
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/debug/node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/decimal.js": {
|
||||
"version": "10.4.2",
|
||||
"resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.2.tgz",
|
||||
"integrity": "sha512-ic1yEvwT6GuvaYwBLLY6/aFFgjZdySKTE8en/fkU3QICTmRtgtSlFn0u0BXN06InZwtfCelR7j8LRiDI/02iGA=="
|
||||
},
|
||||
"node_modules/define-properties": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz",
|
||||
"integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==",
|
||||
"dependencies": {
|
||||
"has-property-descriptors": "^1.0.0",
|
||||
"object-keys": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/elliptic": {
|
||||
"version": "6.5.4",
|
||||
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
|
||||
"integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
|
||||
"dependencies": {
|
||||
"bn.js": "^4.11.9",
|
||||
"brorand": "^1.1.0",
|
||||
"hash.js": "^1.0.0",
|
||||
"hmac-drbg": "^1.0.1",
|
||||
"inherits": "^2.0.4",
|
||||
"minimalistic-assert": "^1.0.1",
|
||||
"minimalistic-crypto-utils": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/elliptic/node_modules/bn.js": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
|
||||
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
|
||||
},
|
||||
"node_modules/es6-object-assign": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
|
||||
"integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw=="
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/for-each": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
|
||||
"integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
|
||||
"dependencies": {
|
||||
"is-callable": "^1.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
|
||||
"integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-symbols": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
|
||||
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.1.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/has-property-descriptors": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
|
||||
"integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.1.1"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
||||
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-tostringtag": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
|
||||
"integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
|
||||
"dependencies": {
|
||||
"has-symbols": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/hash-base": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz",
|
||||
"integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.4",
|
||||
"readable-stream": "^3.6.0",
|
||||
"safe-buffer": "^5.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/hash.js": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
|
||||
"integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"minimalistic-assert": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/hmac-drbg": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
||||
"integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==",
|
||||
"dependencies": {
|
||||
"hash.js": "^1.0.3",
|
||||
"minimalistic-assert": "^1.0.0",
|
||||
"minimalistic-crypto-utils": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/ieee754": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
||||
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"node_modules/is-arguments": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
|
||||
"integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"has-tostringtag": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-callable": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
|
||||
"integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-generator-function": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz",
|
||||
"integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==",
|
||||
"dependencies": {
|
||||
"has-tostringtag": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-nan": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz",
|
||||
"integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.0",
|
||||
"define-properties": "^1.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-typed-array": {
|
||||
"version": "1.1.10",
|
||||
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz",
|
||||
"integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==",
|
||||
"dependencies": {
|
||||
"available-typed-arrays": "^1.0.5",
|
||||
"call-bind": "^1.0.2",
|
||||
"for-each": "^0.3.3",
|
||||
"gopd": "^1.0.1",
|
||||
"has-tostringtag": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonschema": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.2.tgz",
|
||||
"integrity": "sha512-iX5OFQ6yx9NgbHCwse51ohhKgLuLL7Z5cNOeZOPIlDUtAMrxlruHLzVZxbltdHE5mEDXN+75oFOwq6Gn0MZwsA==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||
},
|
||||
"node_modules/md5.js": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
|
||||
"integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
|
||||
"dependencies": {
|
||||
"hash-base": "^3.0.0",
|
||||
"inherits": "^2.0.1",
|
||||
"safe-buffer": "^5.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/minimalistic-assert": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
|
||||
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
|
||||
},
|
||||
"node_modules/minimalistic-crypto-utils": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
|
||||
"integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg=="
|
||||
},
|
||||
"node_modules/nan": {
|
||||
"version": "2.17.0",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
|
||||
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ=="
|
||||
},
|
||||
"node_modules/object-is": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz",
|
||||
"integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/object-keys": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
|
||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/pbkdf2": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
|
||||
"integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==",
|
||||
"dependencies": {
|
||||
"create-hash": "^1.1.2",
|
||||
"create-hmac": "^1.1.4",
|
||||
"ripemd160": "^2.0.1",
|
||||
"safe-buffer": "^5.0.1",
|
||||
"sha.js": "^2.4.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/randombytes": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
||||
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/ripemd160": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
|
||||
"integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
|
||||
"dependencies": {
|
||||
"hash-base": "^3.0.0",
|
||||
"inherits": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/ripple-address-codec": {
|
||||
"version": "4.2.5",
|
||||
"resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.2.5.tgz",
|
||||
"integrity": "sha512-SZ96zZH+0REeyEcYVFl0vqcsGRXiFXS2RUgHupHhtVkOEk6men53vngVjJwBrSnY+oa6Cri15q1zSni3DEoxNw==",
|
||||
"dependencies": {
|
||||
"base-x": "^3.0.9",
|
||||
"create-hash": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/ripple-binary-codec": {
|
||||
"version": "1.4.3",
|
||||
"resolved": "https://registry.npmjs.org/ripple-binary-codec/-/ripple-binary-codec-1.4.3.tgz",
|
||||
"integrity": "sha512-P4ALjAJWBJpRApTQO+dJCrHE6mZxm7ypZot9OS0a3RCKOWTReNw0pDWfdhCGh1qXh71TeQnAk4CHdMLwR/76oQ==",
|
||||
"dependencies": {
|
||||
"assert": "^2.0.0",
|
||||
"big-integer": "^1.6.48",
|
||||
"buffer": "5.6.0",
|
||||
"create-hash": "^1.2.0",
|
||||
"decimal.js": "^10.2.0",
|
||||
"ripple-address-codec": "^4.2.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/ripple-binary-codec/node_modules/buffer": {
|
||||
"version": "5.6.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
|
||||
"integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
|
||||
"dependencies": {
|
||||
"base64-js": "^1.0.2",
|
||||
"ieee754": "^1.1.4"
|
||||
}
|
||||
},
|
||||
"node_modules/ripple-keypairs": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.1.5.tgz",
|
||||
"integrity": "sha512-wLJXIBsMVazn2Yp/7oP4PvgA4Gd1HtuZLftdEJFNOLgraf82phqa2AnNK3t9f3XeQnApW1jAe/FcFFOY6QUn5w==",
|
||||
"dependencies": {
|
||||
"bn.js": "^5.1.1",
|
||||
"brorand": "^1.0.5",
|
||||
"elliptic": "^6.5.4",
|
||||
"hash.js": "^1.0.3",
|
||||
"ripple-address-codec": "^4.2.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/ripple-lib": {
|
||||
"version": "1.10.1",
|
||||
"resolved": "https://registry.npmjs.org/ripple-lib/-/ripple-lib-1.10.1.tgz",
|
||||
"integrity": "sha512-OQk+Syl2JfxKxV2KuF/kBMtnh012I5tNnziP3G4WDGCGSIAgeqkOgkR59IQ0YDNrs1YW8GbApxrdMSRi/QClcA==",
|
||||
"dependencies": {
|
||||
"@types/lodash": "^4.14.136",
|
||||
"@types/ws": "^7.2.0",
|
||||
"bignumber.js": "^9.0.0",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"jsonschema": "1.2.2",
|
||||
"lodash": "^4.17.4",
|
||||
"ripple-address-codec": "^4.1.1",
|
||||
"ripple-binary-codec": "^1.1.3",
|
||||
"ripple-keypairs": "^1.0.3",
|
||||
"ripple-lib-transactionparser": "0.8.2",
|
||||
"ws": "^7.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0",
|
||||
"yarn": "^1.15.2"
|
||||
}
|
||||
},
|
||||
"node_modules/ripple-lib-transactionparser": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/ripple-lib-transactionparser/-/ripple-lib-transactionparser-0.8.2.tgz",
|
||||
"integrity": "sha512-1teosQLjYHLyOQrKUQfYyMjDR3MAq/Ga+MJuLUfpBMypl4LZB4bEoMcmG99/+WVTEiZOezJmH9iCSvm/MyxD+g==",
|
||||
"dependencies": {
|
||||
"bignumber.js": "^9.0.0",
|
||||
"lodash": "^4.17.15"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/sha.js": {
|
||||
"version": "2.4.11",
|
||||
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
|
||||
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.1",
|
||||
"safe-buffer": "^5.0.1"
|
||||
},
|
||||
"bin": {
|
||||
"sha.js": "bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"dependencies": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tiny-secp256k1": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz",
|
||||
"integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.3.0",
|
||||
"bn.js": "^4.11.8",
|
||||
"create-hmac": "^1.1.7",
|
||||
"elliptic": "^6.4.0",
|
||||
"nan": "^2.13.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tiny-secp256k1/node_modules/bn.js": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
|
||||
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
|
||||
},
|
||||
"node_modules/typeforce": {
|
||||
"version": "1.18.0",
|
||||
"resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz",
|
||||
"integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g=="
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.9.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz",
|
||||
"integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/util": {
|
||||
"version": "0.12.5",
|
||||
"resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz",
|
||||
"integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"is-arguments": "^1.0.4",
|
||||
"is-generator-function": "^1.0.7",
|
||||
"is-typed-array": "^1.1.3",
|
||||
"which-typed-array": "^1.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||
},
|
||||
"node_modules/which-typed-array": {
|
||||
"version": "1.1.9",
|
||||
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz",
|
||||
"integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==",
|
||||
"dependencies": {
|
||||
"available-typed-arrays": "^1.0.5",
|
||||
"call-bind": "^1.0.2",
|
||||
"for-each": "^0.3.3",
|
||||
"gopd": "^1.0.1",
|
||||
"has-tostringtag": "^1.0.0",
|
||||
"is-typed-array": "^1.1.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/wif": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz",
|
||||
"integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==",
|
||||
"dependencies": {
|
||||
"bs58check": "<3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "7.5.9",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz",
|
||||
"integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==",
|
||||
"engines": {
|
||||
"node": ">=8.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bufferutil": "^4.0.1",
|
||||
"utf-8-validate": "^5.0.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bufferutil": {
|
||||
"optional": true
|
||||
},
|
||||
"utf-8-validate": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/xrpio": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/xrpio/-/xrpio-0.2.1.tgz",
|
||||
"integrity": "sha512-2Dmse3BdEHDztXfn7LpV5GSX8W9ue2mGEBu5NvoGJMIauvKZTniSdkBpMU0D1uu3v3OyDin2q+puWERQ8Kqh+g==",
|
||||
"dependencies": {
|
||||
"ripple-lib": "^1.10.0",
|
||||
"xrpl": "^2.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xrpl": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/xrpl/-/xrpl-2.7.0.tgz",
|
||||
"integrity": "sha512-P4M/Myxn2U7wl1avAG2Y/JuJMlKw2boLNx0f9woYQJLrS68sICmAfGOYKqPSzwRPc9P7kmydNrk+737nmFW5Vw==",
|
||||
"dependencies": {
|
||||
"bignumber.js": "^9.0.0",
|
||||
"bip32": "^2.0.6",
|
||||
"bip39": "^3.0.4",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"lodash": "^4.17.4",
|
||||
"ripple-address-codec": "^4.2.5",
|
||||
"ripple-binary-codec": "^1.4.3",
|
||||
"ripple-keypairs": "^1.1.5",
|
||||
"ws": "^8.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xrpl/node_modules/ws": {
|
||||
"version": "8.11.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz",
|
||||
"integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bufferutil": "^4.0.1",
|
||||
"utf-8-validate": "^5.0.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bufferutil": {
|
||||
"optional": true
|
||||
},
|
||||
"utf-8-validate": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/zod": {
|
||||
"version": "3.21.4",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz",
|
||||
"integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Installation
|
||||
> `npm install --save @types/lodash`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for Lo-Dash (https://lodash.com).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 14 Nov 2022 21:32:45 GMT
|
||||
* Dependencies: none
|
||||
* Global values: `_`
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Brian Zengel](https://github.com/bczengel), [Ilya Mochalov](https://github.com/chrootsu), [AJ Richardson](https://github.com/aj-r), [e-cloud](https://github.com/e-cloud), [Georgii Dolzhykov](https://github.com/thorn0), [Jack Moore](https://github.com/jtmthf), [Dominique Rau](https://github.com/DomiR), and [William Chelman](https://github.com/WilliamChelman).
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { add } from "./index";
|
||||
export = add;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { after } from "./index";
|
||||
export = after;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { ary } from "./index";
|
||||
export = ary;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { assign } from "./index";
|
||||
export = assign;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { assignIn } from "./index";
|
||||
export = assignIn;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { assignInWith } from "./index";
|
||||
export = assignInWith;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { assignWith } from "./index";
|
||||
export = assignWith;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { at } from "./index";
|
||||
export = at;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { attempt } from "./index";
|
||||
export = attempt;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { before } from "./index";
|
||||
export = before;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { bind } from "./index";
|
||||
export = bind;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { bindAll } from "./index";
|
||||
export = bindAll;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { bindKey } from "./index";
|
||||
export = bindKey;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { camelCase } from "./index";
|
||||
export = camelCase;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { capitalize } from "./index";
|
||||
export = capitalize;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { castArray } from "./index";
|
||||
export = castArray;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { ceil } from "./index";
|
||||
export = ceil;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { chain } from "./index";
|
||||
export = chain;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { chunk } from "./index";
|
||||
export = chunk;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { clamp } from "./index";
|
||||
export = clamp;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { clone } from "./index";
|
||||
export = clone;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { cloneDeep } from "./index";
|
||||
export = cloneDeep;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { cloneDeepWith } from "./index";
|
||||
export = cloneDeepWith;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { cloneWith } from "./index";
|
||||
export = cloneWith;
|
||||
+2126
File diff suppressed because it is too large
Load Diff
+1930
File diff suppressed because it is too large
Load Diff
+280
@@ -0,0 +1,280 @@
|
||||
import _ = require("../index");
|
||||
// tslint:disable-next-line:strict-export-declare-modifiers
|
||||
type GlobalPartial<T> = Partial<T>;
|
||||
declare module "../index" {
|
||||
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
|
||||
type PartialObject<T> = GlobalPartial<T>;
|
||||
type Many<T> = T | ReadonlyArray<T>;
|
||||
type ImpChain<T> =
|
||||
T extends { __trapAny: any } ? Collection<any> & Function<any> & Object<any> & Primitive<any> & String :
|
||||
T extends null | undefined ? never :
|
||||
T extends string | null | undefined ? String :
|
||||
T extends (...args: any) => any ? Function<T> :
|
||||
T extends List<infer U> | null | undefined ? Collection<U> :
|
||||
T extends object | null | undefined ? Object<T> :
|
||||
Primitive<T>;
|
||||
type ExpChain<T> =
|
||||
T extends { __trapAny: any } ? CollectionChain<any> & FunctionChain<any> & ObjectChain<any> & PrimitiveChain<any> & StringChain :
|
||||
T extends null | undefined ? never :
|
||||
T extends string ? StringChain :
|
||||
T extends string | null | undefined ? StringNullableChain :
|
||||
T extends (...args: any) => any ? FunctionChain<T> :
|
||||
T extends List<infer U> | null | undefined ? CollectionChain<U> :
|
||||
T extends object | null | undefined ? ObjectChain<T> :
|
||||
PrimitiveChain<T>;
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a lodash object which wraps value to enable implicit method chain sequences.
|
||||
* Methods that operate on and return arrays, collections, and functions can be chained together.
|
||||
* Methods that retrieve a single value or may return a primitive value will automatically end the
|
||||
* chain sequence and return the unwrapped value. Otherwise, the value must be unwrapped with value().
|
||||
*
|
||||
* Explicit chain sequences, which must be unwrapped with value(), may be enabled using _.chain.
|
||||
*
|
||||
* The execution of chained methods is lazy, that is, it's deferred until value() is
|
||||
* implicitly or explicitly called.
|
||||
*
|
||||
* Lazy evaluation allows several methods to support shortcut fusion. Shortcut fusion
|
||||
* is an optimization to merge iteratee calls; this avoids the creation of intermediate
|
||||
* arrays and can greatly reduce the number of iteratee executions. Sections of a chain
|
||||
* sequence qualify for shortcut fusion if the section is applied to an array and iteratees
|
||||
* accept only one argument. The heuristic for whether a section qualifies for shortcut
|
||||
* fusion is subject to change.
|
||||
*
|
||||
* Chaining is supported in custom builds as long as the value() method is directly or
|
||||
* indirectly included in the build.
|
||||
*
|
||||
* In addition to lodash methods, wrappers have Array and String methods.
|
||||
* The wrapper Array methods are:
|
||||
* concat, join, pop, push, shift, sort, splice, and unshift.
|
||||
* The wrapper String methods are:
|
||||
* replace and split.
|
||||
*
|
||||
* The wrapper methods that support shortcut fusion are:
|
||||
* at, compact, drop, dropRight, dropWhile, filter, find, findLast, head, initial, last,
|
||||
* map, reject, reverse, slice, tail, take, takeRight, takeRightWhile, takeWhile, and toArray
|
||||
*
|
||||
* The chainable wrapper methods are:
|
||||
* after, ary, assign, assignIn, assignInWith, assignWith, at, before, bind, bindAll, bindKey,
|
||||
* castArray, chain, chunk, commit, compact, concat, conforms, constant, countBy, create,
|
||||
* curry, debounce, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith,
|
||||
* drop, dropRight, dropRightWhile, dropWhile, extend, extendWith, fill, filter, flatMap,
|
||||
* flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, flow, flowRight,
|
||||
* fromPairs, functions, functionsIn, groupBy, initial, intersection, intersectionBy, intersectionWith,
|
||||
* invert, invertBy, invokeMap, iteratee, keyBy, keys, keysIn, map, mapKeys, mapValues,
|
||||
* matches, matchesProperty, memoize, merge, mergeWith, method, methodOf, mixin, negate,
|
||||
* nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, partial, partialRight,
|
||||
* partition, pick, pickBy, plant, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt,
|
||||
* push, range, rangeRight, rearg, reject, remove, rest, reverse, sampleSize, set, setWith,
|
||||
* shuffle, slice, sort, sortBy, sortedUniq, sortedUniqBy, splice, spread, tail, take,
|
||||
* takeRight, takeRightWhile, takeWhile, tap, throttle, thru, toArray, toPairs, toPairsIn,
|
||||
* toPath, toPlainObject, transform, unary, union, unionBy, unionWith, uniq, uniqBy, uniqWith,
|
||||
* unset, unshift, unzip, unzipWith, update, updateWith, values, valuesIn, without, wrap,
|
||||
* xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, and zipWith.
|
||||
*
|
||||
* The wrapper methods that are not chainable by default are:
|
||||
* add, attempt, camelCase, capitalize, ceil, clamp, clone, cloneDeep, cloneDeepWith, cloneWith,
|
||||
* conformsTo, deburr, defaultTo, divide, each, eachRight, endsWith, eq, escape, escapeRegExp,
|
||||
* every, find, findIndex, findKey, findLast, findLastIndex, findLastKey, first, floor, forEach,
|
||||
* forEachRight, forIn, forInRight, forOwn, forOwnRight, get, gt, gte, has, hasIn, head,
|
||||
* identity, includes, indexOf, inRange, invoke, isArguments, isArray, isArrayBuffer,
|
||||
* isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith,
|
||||
* isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN,
|
||||
* isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp,
|
||||
* isSafeInteger, isSet, isString, isUndefined, isTypedArray, isWeakMap, isWeakSet, join,
|
||||
* kebabCase, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, max, maxBy, mean, meanBy,
|
||||
* min, minBy, multiply, noConflict, noop, now, nth, pad, padEnd, padStart, parseInt, pop,
|
||||
* random, reduce, reduceRight, repeat, result, round, runInContext, sample, shift, size,
|
||||
* snakeCase, some, sortedIndex, sortedIndexBy, sortedLastIndex, sortedLastIndexBy, startCase,
|
||||
* startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy,
|
||||
* template, times, toFinite, toInteger, toJSON, toLength, toLower, toNumber, toSafeInteger,
|
||||
* toString, toUpper, trim, trimEnd, trimStart, truncate, unescape, uniqueId, upperCase,
|
||||
* upperFirst, value, and words.
|
||||
**/
|
||||
<TrapAny extends { __trapAny: any }>(value: TrapAny): Collection<any> & Function<any> & Object<any> & Primitive<any> & String;
|
||||
<T extends null | undefined>(value: T): Primitive<T>;
|
||||
(value: string | null | undefined): String;
|
||||
<T extends (...args: any) => any>(value: T): Function<T>;
|
||||
<T = any>(value: List<T> | null | undefined): Collection<T>;
|
||||
<T extends object>(value: T | null | undefined): Object<T>;
|
||||
<T>(value: T): Primitive<T>;
|
||||
/**
|
||||
* The semantic version number.
|
||||
**/
|
||||
VERSION: string;
|
||||
/**
|
||||
* By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
|
||||
* (ERB). Change the following template settings to use alternative delimiters.
|
||||
**/
|
||||
templateSettings: TemplateSettings;
|
||||
}
|
||||
/**
|
||||
* By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
|
||||
* (ERB). Change the following template settings to use alternative delimiters.
|
||||
**/
|
||||
interface TemplateSettings {
|
||||
/**
|
||||
* The "escape" delimiter.
|
||||
**/
|
||||
escape?: RegExp | undefined;
|
||||
/**
|
||||
* The "evaluate" delimiter.
|
||||
**/
|
||||
evaluate?: RegExp | undefined;
|
||||
/**
|
||||
* An object to import into the template as local variables.
|
||||
*/
|
||||
imports?: Dictionary<any> | undefined;
|
||||
/**
|
||||
* The "interpolate" delimiter.
|
||||
*/
|
||||
interpolate?: RegExp | undefined;
|
||||
/**
|
||||
* Used to reference the data object in the template text.
|
||||
*/
|
||||
variable?: string | undefined;
|
||||
}
|
||||
/**
|
||||
* Creates a cache object to store key/value pairs.
|
||||
*/
|
||||
interface MapCache {
|
||||
/**
|
||||
* Removes `key` and its value from the cache.
|
||||
* @param key The key of the value to remove.
|
||||
* @return Returns `true` if the entry was removed successfully, else `false`.
|
||||
*/
|
||||
delete(key: any): boolean;
|
||||
/**
|
||||
* Gets the cached value for `key`.
|
||||
* @param key The key of the value to get.
|
||||
* @return Returns the cached value.
|
||||
*/
|
||||
get(key: any): any;
|
||||
/**
|
||||
* Checks if a cached value for `key` exists.
|
||||
* @param key The key of the entry to check.
|
||||
* @return Returns `true` if an entry for `key` exists, else `false`.
|
||||
*/
|
||||
has(key: any): boolean;
|
||||
/**
|
||||
* Sets `value` to `key` of the cache.
|
||||
* @param key The key of the value to cache.
|
||||
* @param value The value to cache.
|
||||
* @return Returns the cache object.
|
||||
*/
|
||||
set(key: any, value: any): this;
|
||||
/**
|
||||
* Removes all key-value entries from the map.
|
||||
*/
|
||||
clear?: (() => void) | undefined;
|
||||
}
|
||||
interface MapCacheConstructor {
|
||||
new (): MapCache;
|
||||
}
|
||||
interface Collection<T> {
|
||||
pop(): T | undefined;
|
||||
push(...items: T[]): this;
|
||||
shift(): T | undefined;
|
||||
sort(compareFn?: (a: T, b: T) => number): this;
|
||||
splice(start: number, deleteCount?: number, ...items: T[]): this;
|
||||
unshift(...items: T[]): this;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
pop(): ExpChain<T | undefined>;
|
||||
push(...items: T[]): this;
|
||||
shift(): ExpChain<T | undefined>;
|
||||
sort(compareFn?: (a: T, b: T) => number): this;
|
||||
splice(start: number, deleteCount?: number, ...items: T[]): this;
|
||||
unshift(...items: T[]): this;
|
||||
}
|
||||
interface Function<T extends (...args: any) => any> extends LoDashImplicitWrapper<T> {
|
||||
}
|
||||
interface String extends LoDashImplicitWrapper<string> {
|
||||
}
|
||||
interface Object<T> extends LoDashImplicitWrapper<T> {
|
||||
}
|
||||
interface Collection<T> extends LoDashImplicitWrapper<T[]> {
|
||||
}
|
||||
interface Primitive<T> extends LoDashImplicitWrapper<T> {
|
||||
}
|
||||
interface FunctionChain<T extends (...args: any) => any> extends LoDashExplicitWrapper<T> {
|
||||
}
|
||||
interface StringChain extends LoDashExplicitWrapper<string> {
|
||||
}
|
||||
interface StringNullableChain extends LoDashExplicitWrapper<string | undefined> {
|
||||
}
|
||||
interface ObjectChain<T> extends LoDashExplicitWrapper<T> {
|
||||
}
|
||||
interface CollectionChain<T> extends LoDashExplicitWrapper<T[]> {
|
||||
}
|
||||
interface PrimitiveChain<T> extends LoDashExplicitWrapper<T> {
|
||||
}
|
||||
type NotVoid = unknown;
|
||||
type IterateeShorthand<T> = PropertyName | [PropertyName, any] | PartialShallow<T>;
|
||||
type ArrayIterator<T, TResult> = (value: T, index: number, collection: T[]) => TResult;
|
||||
type ListIterator<T, TResult> = (value: T, index: number, collection: List<T>) => TResult;
|
||||
type ListIteratee<T> = ListIterator<T, NotVoid> | IterateeShorthand<T>;
|
||||
type ListIterateeCustom<T, TResult> = ListIterator<T, TResult> | IterateeShorthand<T>;
|
||||
type ListIteratorTypeGuard<T, S extends T> = (value: T, index: number, collection: List<T>) => value is S;
|
||||
// Note: key should be string, not keyof T, because the actual object may contain extra properties that were not specified in the type.
|
||||
type ObjectIterator<TObject, TResult> = (value: TObject[keyof TObject], key: string, collection: TObject) => TResult;
|
||||
type ObjectIteratee<TObject> = ObjectIterator<TObject, NotVoid> | IterateeShorthand<TObject[keyof TObject]>;
|
||||
type ObjectIterateeCustom<TObject, TResult> = ObjectIterator<TObject, TResult> | IterateeShorthand<TObject[keyof TObject]>;
|
||||
type ObjectIteratorTypeGuard<TObject, S extends TObject[keyof TObject]> = (value: TObject[keyof TObject], key: string, collection: TObject) => value is S;
|
||||
type StringIterator<TResult> = (char: string, index: number, string: string) => TResult;
|
||||
/** @deprecated Use MemoVoidArrayIterator or MemoVoidDictionaryIterator instead. */
|
||||
type MemoVoidIterator<T, TResult> = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => void;
|
||||
/** @deprecated Use MemoListIterator or MemoObjectIterator instead. */
|
||||
type MemoIterator<T, TResult> = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => TResult;
|
||||
type MemoListIterator<T, TResult, TList> = (prev: TResult, curr: T, index: number, list: TList) => TResult;
|
||||
type MemoObjectIterator<T, TResult, TList> = (prev: TResult, curr: T, key: string, list: TList) => TResult;
|
||||
type MemoIteratorCapped<T, TResult> = (prev: TResult, curr: T) => TResult;
|
||||
type MemoIteratorCappedRight<T, TResult> = (curr: T, prev: TResult) => TResult;
|
||||
type MemoVoidArrayIterator<T, TResult> = (acc: TResult, curr: T, index: number, arr: T[]) => void;
|
||||
type MemoVoidDictionaryIterator<T, K extends string | number | symbol, TResult> = (acc: TResult, curr: T, key: K, dict: Record<K, T>) => void;
|
||||
type MemoVoidIteratorCapped<T, TResult> = (acc: TResult, curr: T) => void;
|
||||
type ValueIteratee<T> = ((value: T) => NotVoid) | IterateeShorthand<T>;
|
||||
type ValueIterateeCustom<T, TResult> = ((value: T) => TResult) | IterateeShorthand<T>;
|
||||
type ValueIteratorTypeGuard<T, S extends T> = (value: T) => value is S;
|
||||
type ValueKeyIteratee<T> = ((value: T, key: string) => NotVoid) | IterateeShorthand<T>;
|
||||
type ValueKeyIterateeTypeGuard<T, S extends T> = (value: T, key: string) => value is S;
|
||||
type Comparator<T> = (a: T, b: T) => boolean;
|
||||
type Comparator2<T1, T2> = (a: T1, b: T2) => boolean;
|
||||
type PropertyName = string | number | symbol;
|
||||
type PropertyPath = Many<PropertyName>;
|
||||
/** Common interface between Arrays and jQuery objects */
|
||||
type List<T> = ArrayLike<T>;
|
||||
interface Dictionary<T> {
|
||||
[index: string]: T;
|
||||
}
|
||||
interface NumericDictionary<T> {
|
||||
[index: number]: T;
|
||||
}
|
||||
// Crazy typedef needed get _.omit to work properly with Dictionary and NumericDictionary
|
||||
type AnyKindOfDictionary =
|
||||
| Dictionary<unknown>
|
||||
| NumericDictionary<unknown>;
|
||||
type PartialShallow<T> = {
|
||||
[P in keyof T]?: T[P] extends object ? object : T[P]
|
||||
};
|
||||
// For backwards compatibility
|
||||
type LoDashImplicitArrayWrapper<T> = LoDashImplicitWrapper<T[]>;
|
||||
type LoDashImplicitNillableArrayWrapper<T> = LoDashImplicitWrapper<T[] | null | undefined>;
|
||||
type LoDashImplicitObjectWrapper<T> = LoDashImplicitWrapper<T>;
|
||||
type LoDashImplicitNillableObjectWrapper<T> = LoDashImplicitWrapper<T | null | undefined>;
|
||||
type LoDashImplicitNumberArrayWrapper = LoDashImplicitWrapper<number[]>;
|
||||
type LoDashImplicitStringWrapper = LoDashImplicitWrapper<string>;
|
||||
type LoDashExplicitArrayWrapper<T> = LoDashExplicitWrapper<T[]>;
|
||||
type LoDashExplicitNillableArrayWrapper<T> = LoDashExplicitWrapper<T[] | null | undefined>;
|
||||
type LoDashExplicitObjectWrapper<T> = LoDashExplicitWrapper<T>;
|
||||
type LoDashExplicitNillableObjectWrapper<T> = LoDashExplicitWrapper<T | null | undefined>;
|
||||
type LoDashExplicitNumberArrayWrapper = LoDashExplicitWrapper<number[]>;
|
||||
type LoDashExplicitStringWrapper = LoDashExplicitWrapper<string>;
|
||||
type DictionaryIterator<T, TResult> = ObjectIterator<Dictionary<T>, TResult>;
|
||||
type DictionaryIteratee<T> = ObjectIteratee<Dictionary<T>>;
|
||||
type DictionaryIteratorTypeGuard<T, S extends T> = ObjectIteratorTypeGuard<Dictionary<T>, S>;
|
||||
// NOTE: keys of objects at run time are always strings, even when a NumericDictionary is being iterated.
|
||||
type NumericDictionaryIterator<T, TResult> = (value: T, key: string, collection: NumericDictionary<T>) => TResult;
|
||||
type NumericDictionaryIteratee<T> = NumericDictionaryIterator<T, NotVoid> | IterateeShorthand<T>;
|
||||
type NumericDictionaryIterateeCustom<T, TResult> = NumericDictionaryIterator<T, TResult> | IterateeShorthand<T>;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
import _ = require("../index");
|
||||
declare module "../index" {
|
||||
interface LoDashStatic {
|
||||
/*
|
||||
* Gets the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC).
|
||||
*
|
||||
* @return The number of milliseconds.
|
||||
*/
|
||||
now(): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.now
|
||||
*/
|
||||
now(): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.now
|
||||
*/
|
||||
now(): PrimitiveChain<number>;
|
||||
}
|
||||
}
|
||||
+1446
File diff suppressed because it is too large
Load Diff
+1700
File diff suppressed because it is too large
Load Diff
+405
@@ -0,0 +1,405 @@
|
||||
import _ = require("../index");
|
||||
declare module "../index" {
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Adds two numbers.
|
||||
*
|
||||
* @param augend The first number to add.
|
||||
* @param addend The second number to add.
|
||||
* @return Returns the sum.
|
||||
*/
|
||||
add(augend: number, addend: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.add
|
||||
*/
|
||||
add(addend: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.add
|
||||
*/
|
||||
add(addend: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Calculates n rounded up to precision.
|
||||
*
|
||||
* @param n The number to round up.
|
||||
* @param precision The precision to round up to.
|
||||
* @return Returns the rounded up number.
|
||||
*/
|
||||
ceil(n: number, precision?: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.ceil
|
||||
*/
|
||||
ceil(precision?: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.ceil
|
||||
*/
|
||||
ceil(precision?: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Divide two numbers.
|
||||
*
|
||||
* @param dividend The first number in a division.
|
||||
* @param divisor The second number in a division.
|
||||
* @returns Returns the quotient.
|
||||
*/
|
||||
divide(dividend: number, divisor: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.divide
|
||||
*/
|
||||
divide(divisor: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.divide
|
||||
*/
|
||||
divide(divisor: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Calculates n rounded down to precision.
|
||||
*
|
||||
* @param n The number to round down.
|
||||
* @param precision The precision to round down to.
|
||||
* @return Returns the rounded down number.
|
||||
*/
|
||||
floor(n: number, precision?: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.floor
|
||||
*/
|
||||
floor(precision?: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.floor
|
||||
*/
|
||||
floor(precision?: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Computes the maximum value of `array`. If `array` is empty or falsey
|
||||
* `undefined` is returned.
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @returns Returns the maximum value.
|
||||
*/
|
||||
max<T>(collection: List<T> | null | undefined): T | undefined;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.max
|
||||
*/
|
||||
max(): T | undefined;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.max
|
||||
*/
|
||||
max(): ExpChain<T | undefined>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method is like `_.max` except that it accepts `iteratee` which is
|
||||
* invoked for each element in `array` to generate the criterion by which
|
||||
* the value is ranked. The iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @param iteratee The iteratee invoked per element.
|
||||
* @returns Returns the maximum value.
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
||||
*
|
||||
* _.maxBy(objects, function(o) { return o.n; });
|
||||
* // => { 'n': 2 }
|
||||
*
|
||||
* // using the `_.property` iteratee shorthand
|
||||
* _.maxBy(objects, 'n');
|
||||
* // => { 'n': 2 }
|
||||
*/
|
||||
maxBy<T>(collection: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T | undefined;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.maxBy
|
||||
*/
|
||||
maxBy(iteratee?: ValueIteratee<T>): T | undefined;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.maxBy
|
||||
*/
|
||||
maxBy(iteratee?: ValueIteratee<T>): ExpChain<T | undefined>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Computes the mean of the values in `array`.
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @returns Returns the mean.
|
||||
* @example
|
||||
*
|
||||
* _.mean([4, 2, 8, 6]);
|
||||
* // => 5
|
||||
*/
|
||||
mean(collection: List<any> | null | undefined): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.mean
|
||||
*/
|
||||
mean(): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.mean
|
||||
*/
|
||||
mean(): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Computes the mean of the provided properties of the objects in the `array`
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @param iteratee The iteratee invoked per element.
|
||||
* @returns Returns the mean.
|
||||
* @example
|
||||
*
|
||||
* _.mean([{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }], 'n');
|
||||
* // => 5
|
||||
*/
|
||||
meanBy<T>(collection: List<T> | null | undefined, iteratee?: ValueIteratee<T>): number;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.meanBy
|
||||
*/
|
||||
meanBy(iteratee?: ValueIteratee<T>): number;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.meanBy
|
||||
*/
|
||||
meanBy(iteratee?: ValueIteratee<T>): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Computes the minimum value of `array`. If `array` is empty or falsey
|
||||
* `undefined` is returned.
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @returns Returns the minimum value.
|
||||
*/
|
||||
min<T>(collection: List<T> | null | undefined): T | undefined;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.min
|
||||
*/
|
||||
min(): T | undefined;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.min
|
||||
*/
|
||||
min(): ExpChain<T | undefined>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method is like `_.min` except that it accepts `iteratee` which is
|
||||
* invoked for each element in `array` to generate the criterion by which
|
||||
* the value is ranked. The iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @param iteratee The iteratee invoked per element.
|
||||
* @returns Returns the minimum value.
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
||||
*
|
||||
* _.minBy(objects, function(o) { return o.a; });
|
||||
* // => { 'n': 1 }
|
||||
*
|
||||
* // using the `_.property` iteratee shorthand
|
||||
* _.minBy(objects, 'n');
|
||||
* // => { 'n': 1 }
|
||||
*/
|
||||
minBy<T>(collection: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T | undefined;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.minBy
|
||||
*/
|
||||
minBy(iteratee?: ValueIteratee<T>): T | undefined;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.minBy
|
||||
*/
|
||||
minBy(iteratee?: ValueIteratee<T>): ExpChain<T | undefined>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Multiply two numbers.
|
||||
* @param multiplier The first number in a multiplication.
|
||||
* @param multiplicand The second number in a multiplication.
|
||||
* @returns Returns the product.
|
||||
*/
|
||||
multiply(multiplier: number, multiplicand: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.multiply
|
||||
*/
|
||||
multiply(multiplicand: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.multiply
|
||||
*/
|
||||
multiply(multiplicand: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Calculates n rounded to precision.
|
||||
*
|
||||
* @param n The number to round.
|
||||
* @param precision The precision to round to.
|
||||
* @return Returns the rounded number.
|
||||
*/
|
||||
round(n: number, precision?: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.round
|
||||
*/
|
||||
round(precision?: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.round
|
||||
*/
|
||||
round(precision?: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Subtract two numbers.
|
||||
*
|
||||
* @category Math
|
||||
* @param minuend The first number in a subtraction.
|
||||
* @param subtrahend The second number in a subtraction.
|
||||
* @returns Returns the difference.
|
||||
* @example
|
||||
*
|
||||
* _.subtract(6, 4);
|
||||
* // => 2
|
||||
*/
|
||||
subtract(minuend: number, subtrahend: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.subtract
|
||||
*/
|
||||
subtract(subtrahend: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.subtract
|
||||
*/
|
||||
subtract(subtrahend: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Computes the sum of the values in `array`.
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @returns Returns the sum.
|
||||
* @example
|
||||
*
|
||||
* _.sum([4, 2, 8, 6]);
|
||||
* // => 20
|
||||
*/
|
||||
sum(collection: List<any> | null | undefined): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.sum
|
||||
*/
|
||||
sum(): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.sum
|
||||
*/
|
||||
sum(): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method is like `_.sum` except that it accepts `iteratee` which is
|
||||
* invoked for each element in `array` to generate the value to be summed.
|
||||
* The iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @param [iteratee=_.identity] The iteratee invoked per element.
|
||||
* @returns Returns the sum.
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
|
||||
*
|
||||
* _.sumBy(objects, function(o) { return o.n; });
|
||||
* // => 20
|
||||
*
|
||||
* // using the `_.property` iteratee shorthand
|
||||
* _.sumBy(objects, 'n');
|
||||
* // => 20
|
||||
*/
|
||||
sumBy<T>(collection: List<T> | null | undefined, iteratee?: ((value: T) => number) | string): number;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.sumBy
|
||||
*/
|
||||
sumBy(iteratee?: ((value: T) => number) | string): number;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.sumBy
|
||||
*/
|
||||
sumBy(iteratee?: ((value: T) => number) | string): PrimitiveChain<number>;
|
||||
}
|
||||
}
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
import _ = require("../index");
|
||||
declare module "../index" {
|
||||
// clamp
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Clamps `number` within the inclusive `lower` and `upper` bounds.
|
||||
*
|
||||
* @category Number
|
||||
* @param number The number to clamp.
|
||||
* @param [lower] The lower bound.
|
||||
* @param upper The upper bound.
|
||||
* @returns Returns the clamped number.
|
||||
* @example
|
||||
*
|
||||
* _.clamp(-10, -5, 5);
|
||||
* // => -5
|
||||
*
|
||||
* _.clamp(10, -5, 5);
|
||||
* // => 5
|
||||
* Clamps `number` within the inclusive `lower` and `upper` bounds.
|
||||
*
|
||||
* @category Number
|
||||
* @param number The number to clamp.
|
||||
* @param [lower] The lower bound.
|
||||
* @param upper The upper bound.
|
||||
* @returns Returns the clamped number.
|
||||
* @example
|
||||
*
|
||||
* _.clamp(-10, -5, 5);
|
||||
* // => -5
|
||||
*
|
||||
* _.clamp(10, -5, 5);
|
||||
*/
|
||||
clamp(number: number, lower: number, upper: number): number;
|
||||
/**
|
||||
* @see _.clamp
|
||||
*/
|
||||
clamp(number: number, upper: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.clamp
|
||||
*/
|
||||
clamp(lower: number, upper: number): number;
|
||||
/**
|
||||
* @see _.clamp
|
||||
*/
|
||||
clamp(upper: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.clamp
|
||||
*/
|
||||
clamp(lower: number, upper: number): PrimitiveChain<number>;
|
||||
/**
|
||||
* @see _.clamp
|
||||
*/
|
||||
clamp(upper: number): PrimitiveChain<number>;
|
||||
}
|
||||
// inRange
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if n is between start and up to but not including, end. If end is not specified it’s set to start
|
||||
* with start then set to 0.
|
||||
*
|
||||
* @param n The number to check.
|
||||
* @param start The start of the range.
|
||||
* @param end The end of the range.
|
||||
* @return Returns true if n is in the range, else false.
|
||||
*/
|
||||
inRange(n: number, start: number, end?: number): boolean;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.inRange
|
||||
*/
|
||||
inRange(start: number, end?: number): boolean;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.inRange
|
||||
*/
|
||||
inRange(start: number, end?: number): PrimitiveChain<boolean>;
|
||||
}
|
||||
// random
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Produces a random number between min and max (inclusive). If only one argument is provided a number between
|
||||
* 0 and the given number is returned. If floating is true, or either min or max are floats, a floating-point
|
||||
* number is returned instead of an integer.
|
||||
*
|
||||
* @param min The minimum possible value.
|
||||
* @param max The maximum possible value.
|
||||
* @param floating Specify returning a floating-point number.
|
||||
* @return Returns the random number.
|
||||
*/
|
||||
random(floating?: boolean): number;
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(max: number, floating?: boolean): number;
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(min: number, max: number, floating?: boolean): number;
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(min: number, index: string | number, guard: object): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(floating?: boolean): number;
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(max: number, floating?: boolean): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(floating?: boolean): PrimitiveChain<number>;
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(max: number, floating?: boolean): PrimitiveChain<number>;
|
||||
}
|
||||
}
|
||||
+2580
File diff suppressed because it is too large
Load Diff
+210
@@ -0,0 +1,210 @@
|
||||
import _ = require("../index");
|
||||
declare module "../index" {
|
||||
// chain
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a lodash object that wraps value with explicit method chaining enabled.
|
||||
*
|
||||
* @param value The value to wrap.
|
||||
* @return Returns the new lodash wrapper instance.
|
||||
*/
|
||||
chain<TrapAny extends { __lodashAnyHack: any }>(value: TrapAny): CollectionChain<any> & FunctionChain<any> & ObjectChain<any> & PrimitiveChain<any> & StringChain;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain<T extends null | undefined>(value: T): PrimitiveChain<T>;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(value: string): StringChain;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(value: string | null | undefined): StringNullableChain;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain<T extends (...args: any[]) => any>(value: T): FunctionChain<T>;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain<T = any>(value: List<T> | null | undefined): CollectionChain<T>;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain<T extends object>(value: T | null | undefined): ObjectChain<T>;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain<T>(value: T): PrimitiveChain<T>;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): CollectionChain<T>;
|
||||
}
|
||||
interface String {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): StringChain;
|
||||
}
|
||||
interface Object<T> {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): ObjectChain<T>;
|
||||
}
|
||||
interface Primitive<T> {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): PrimitiveChain<T>;
|
||||
}
|
||||
interface Function<T extends (...args: any) => any> {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): FunctionChain<T>;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): this;
|
||||
}
|
||||
// prototype.commit
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.commit
|
||||
*/
|
||||
commit(): this;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.commit
|
||||
*/
|
||||
commit(): this;
|
||||
}
|
||||
// prototype.plant
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.plant
|
||||
*/
|
||||
plant(value: unknown): this;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.plant
|
||||
*/
|
||||
plant(value: unknown): this;
|
||||
}
|
||||
// prototype.reverse
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.reverse
|
||||
*/
|
||||
reverse(): this;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.reverse
|
||||
*/
|
||||
reverse(): this;
|
||||
}
|
||||
// prototype.toJSON
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toJSON
|
||||
*/
|
||||
toJSON(): TValue;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toJSON
|
||||
*/
|
||||
toJSON(): TValue;
|
||||
}
|
||||
// prototype.toString
|
||||
interface LoDashWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toString
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
// prototype.value
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.value
|
||||
*/
|
||||
value(): TValue;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.value
|
||||
*/
|
||||
value(): TValue;
|
||||
}
|
||||
// prototype.valueOf
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.valueOf
|
||||
*/
|
||||
valueOf(): TValue;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.valueOf
|
||||
*/
|
||||
valueOf(): TValue;
|
||||
}
|
||||
// tap
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method invokes interceptor and returns value. The interceptor is invoked with one
|
||||
* argument; (value). The purpose of this method is to "tap into" a method chain in order to perform operations
|
||||
* on intermediate results within the chain.
|
||||
*
|
||||
* @param value The value to provide to interceptor.
|
||||
* @param interceptor The function to invoke.
|
||||
* @return Returns value.
|
||||
*/
|
||||
tap<T>(value: T, interceptor: (value: T) => void): T;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.tap
|
||||
*/
|
||||
tap(interceptor: (value: TValue) => void): this;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.tap
|
||||
*/
|
||||
tap(interceptor: (value: TValue) => void): this;
|
||||
}
|
||||
// thru
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method is like _.tap except that it returns the result of interceptor.
|
||||
*
|
||||
* @param value The value to provide to interceptor.
|
||||
* @param interceptor The function to invoke.
|
||||
* @return Returns the result of interceptor.
|
||||
*/
|
||||
thru<T, TResult>(value: T, interceptor: (value: T) => TResult): TResult;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.thru
|
||||
*/
|
||||
thru<TResult>(interceptor: (value: TValue) => TResult): ImpChain<TResult>;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.thru
|
||||
*/
|
||||
thru<TResult>(interceptor: (value: TValue) => TResult): ExpChain<TResult>;
|
||||
}
|
||||
}
|
||||
+788
@@ -0,0 +1,788 @@
|
||||
import _ = require("../index");
|
||||
declare module "../index" {
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts string to camel case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the camel cased string.
|
||||
*/
|
||||
camelCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.camelCase
|
||||
*/
|
||||
camelCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.camelCase
|
||||
*/
|
||||
camelCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts the first character of string to upper case and the remaining to lower case.
|
||||
*
|
||||
* @param string The string to capitalize.
|
||||
* @return Returns the capitalized string.
|
||||
*/
|
||||
capitalize(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.capitalize
|
||||
*/
|
||||
capitalize(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.capitalize
|
||||
*/
|
||||
capitalize(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining
|
||||
* diacritical marks.
|
||||
*
|
||||
* @param string The string to deburr.
|
||||
* @return Returns the deburred string.
|
||||
*/
|
||||
deburr(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.deburr
|
||||
*/
|
||||
deburr(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.deburr
|
||||
*/
|
||||
deburr(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if string ends with the given target string.
|
||||
*
|
||||
* @param string The string to search.
|
||||
* @param target The string to search for.
|
||||
* @param position The position to search from.
|
||||
* @return Returns true if string ends with target, else false.
|
||||
*/
|
||||
endsWith(string?: string, target?: string, position?: number): boolean;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.endsWith
|
||||
*/
|
||||
endsWith(target?: string, position?: number): boolean;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.endsWith
|
||||
*/
|
||||
endsWith(target?: string, position?: number): PrimitiveChain<boolean>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts the characters "&", "<", ">", '"', "'", and "`" in string to their corresponding HTML entities.
|
||||
*
|
||||
* Note: No other characters are escaped. To escape additional characters use a third-party library like he.
|
||||
*
|
||||
* hough the ">" character is escaped for symmetry, characters like ">" and "/" don’t need escaping in HTML
|
||||
* and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens’s
|
||||
* article (under "semi-related fun fact") for more details.
|
||||
*
|
||||
* Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59,
|
||||
* #102, #108, and #133 of the HTML5 Security Cheatsheet for more details.
|
||||
*
|
||||
* When working with HTML you should always quote attribute values to reduce XSS vectors.
|
||||
*
|
||||
* @param string The string to escape.
|
||||
* @return Returns the escaped string.
|
||||
*/
|
||||
escape(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.escape
|
||||
*/
|
||||
escape(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.escape
|
||||
*/
|
||||
escape(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]",
|
||||
* "{", "}", and "|" in string.
|
||||
*
|
||||
* @param string The string to escape.
|
||||
* @return Returns the escaped string.
|
||||
*/
|
||||
escapeRegExp(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.escapeRegExp
|
||||
*/
|
||||
escapeRegExp(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.escapeRegExp
|
||||
*/
|
||||
escapeRegExp(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts string to kebab case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the kebab cased string.
|
||||
*/
|
||||
kebabCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.kebabCase
|
||||
*/
|
||||
kebabCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.kebabCase
|
||||
*/
|
||||
kebabCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts `string`, as space separated words, to lower case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the lower cased string.
|
||||
*/
|
||||
lowerCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.lowerCase
|
||||
*/
|
||||
lowerCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.lowerCase
|
||||
*/
|
||||
lowerCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts the first character of `string` to lower case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the converted string.
|
||||
*/
|
||||
lowerFirst(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.lowerFirst
|
||||
*/
|
||||
lowerFirst(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.lowerFirst
|
||||
*/
|
||||
lowerFirst(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Pads string on the left and right sides if it’s shorter than length. Padding characters are truncated if
|
||||
* they can’t be evenly divided by length.
|
||||
*
|
||||
* @param string The string to pad.
|
||||
* @param length The padding length.
|
||||
* @param chars The string used as padding.
|
||||
* @return Returns the padded string.
|
||||
*/
|
||||
pad(string?: string, length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.pad
|
||||
*/
|
||||
pad(length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.pad
|
||||
*/
|
||||
pad(length?: number, chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Pads string on the right side if it’s shorter than length. Padding characters are truncated if they exceed
|
||||
* length.
|
||||
*
|
||||
* @param string The string to pad.
|
||||
* @param length The padding length.
|
||||
* @param chars The string used as padding.
|
||||
* @return Returns the padded string.
|
||||
*/
|
||||
padEnd(string?: string, length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.padEnd
|
||||
*/
|
||||
padEnd(length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.padEnd
|
||||
*/
|
||||
padEnd(length?: number, chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Pads string on the left side if it’s shorter than length. Padding characters are truncated if they exceed
|
||||
* length.
|
||||
*
|
||||
* @param string The string to pad.
|
||||
* @param length The padding length.
|
||||
* @param chars The string used as padding.
|
||||
* @return Returns the padded string.
|
||||
*/
|
||||
padStart(string?: string, length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.padStart
|
||||
*/
|
||||
padStart(length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.padStart
|
||||
*/
|
||||
padStart(length?: number, chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used
|
||||
* unless value is a hexadecimal, in which case a radix of 16 is used.
|
||||
*
|
||||
* Note: This method aligns with the ES5 implementation of parseInt.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @param radix The radix to interpret value by.
|
||||
* @return Returns the converted integer.
|
||||
*/
|
||||
parseInt(string: string, radix?: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.parseInt
|
||||
*/
|
||||
parseInt(radix?: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.parseInt
|
||||
*/
|
||||
parseInt(radix?: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Repeats the given string n times.
|
||||
*
|
||||
* @param string The string to repeat.
|
||||
* @param n The number of times to repeat the string.
|
||||
* @return Returns the repeated string.
|
||||
*/
|
||||
repeat(string?: string, n?: number): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.repeat
|
||||
*/
|
||||
repeat(n?: number): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.repeat
|
||||
*/
|
||||
repeat(n?: number): StringChain;
|
||||
}
|
||||
type ReplaceFunction = (match: string, ...args: any[]) => string;
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Replaces matches for pattern in string with replacement.
|
||||
*
|
||||
* Note: This method is based on String#replace.
|
||||
*
|
||||
* @return Returns the modified string.
|
||||
*/
|
||||
replace(string: string, pattern: RegExp | string, replacement: ReplaceFunction | string): string;
|
||||
/**
|
||||
* @see _.replace
|
||||
*/
|
||||
replace(pattern: RegExp | string, replacement: ReplaceFunction | string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.replace
|
||||
*/
|
||||
replace(pattern: RegExp | string, replacement: ReplaceFunction | string): string;
|
||||
/**
|
||||
* @see _.replace
|
||||
*/
|
||||
replace(replacement: ReplaceFunction | string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.replace
|
||||
*/
|
||||
replace(pattern: RegExp | string, replacement: ReplaceFunction | string): StringChain;
|
||||
/**
|
||||
* @see _.replace
|
||||
*/
|
||||
replace(replacement: ReplaceFunction | string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts string to snake case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the snake cased string.
|
||||
*/
|
||||
snakeCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.snakeCase
|
||||
*/
|
||||
snakeCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.snakeCase
|
||||
*/
|
||||
snakeCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Splits string by separator.
|
||||
*
|
||||
* Note: This method is based on String#split.
|
||||
*
|
||||
* @param string The string to split.
|
||||
* @param separator The separator pattern to split by.
|
||||
* @param limit The length to truncate results to.
|
||||
* @return Returns the new array of string segments.
|
||||
*/
|
||||
split(string: string | null | undefined, separator?: RegExp | string, limit?: number): string[];
|
||||
/**
|
||||
* @see _.split
|
||||
*/
|
||||
split(string: string | null | undefined, index: string | number, guard: object): string[];
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.split
|
||||
*/
|
||||
split(separator?: RegExp | string, limit?: number): Collection<string>;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.split
|
||||
*/
|
||||
split(separator?: RegExp | string, limit?: number): CollectionChain<string>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts string to start case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the start cased string.
|
||||
*/
|
||||
startCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.startCase
|
||||
*/
|
||||
startCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.startCase
|
||||
*/
|
||||
startCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if string starts with the given target string.
|
||||
*
|
||||
* @param string The string to search.
|
||||
* @param target The string to search for.
|
||||
* @param position The position to search from.
|
||||
* @return Returns true if string starts with target, else false.
|
||||
*/
|
||||
startsWith(string?: string, target?: string, position?: number): boolean;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.startsWith
|
||||
*/
|
||||
startsWith(target?: string, position?: number): boolean;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.startsWith
|
||||
*/
|
||||
startsWith(target?: string, position?: number): PrimitiveChain<boolean>;
|
||||
}
|
||||
|
||||
interface TemplateOptions extends TemplateSettings {
|
||||
/**
|
||||
* @see _.sourceURL
|
||||
*/
|
||||
sourceURL?: string | undefined;
|
||||
}
|
||||
interface TemplateExecutor {
|
||||
(data?: object): string;
|
||||
/**
|
||||
* @see _.source
|
||||
*/
|
||||
source: string;
|
||||
}
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a compiled template function that can interpolate data properties in "interpolate" delimiters,
|
||||
* HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate"
|
||||
* delimiters. Data properties may be accessed as free variables in the template. If a setting object is
|
||||
* provided it takes precedence over _.templateSettings values.
|
||||
*
|
||||
* Note: In the development build _.template utilizes
|
||||
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier
|
||||
* debugging.
|
||||
*
|
||||
* For more information on precompiling templates see
|
||||
* [lodash's custom builds documentation](https://lodash.com/custom-builds).
|
||||
*
|
||||
* For more information on Chrome extension sandboxes see
|
||||
* [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
|
||||
*
|
||||
* @param string The template string.
|
||||
* @param options The options object.
|
||||
* @param options.escape The HTML "escape" delimiter.
|
||||
* @param options.evaluate The "evaluate" delimiter.
|
||||
* @param options.imports An object to import into the template as free variables.
|
||||
* @param options.interpolate The "interpolate" delimiter.
|
||||
* @param options.sourceURL The sourceURL of the template's compiled source.
|
||||
* @param options.variable The data object variable name.
|
||||
* @return Returns the compiled template function.
|
||||
*/
|
||||
template(string?: string, options?: TemplateOptions): TemplateExecutor;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.template
|
||||
*/
|
||||
template(options?: TemplateOptions): TemplateExecutor;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.template
|
||||
*/
|
||||
template(options?: TemplateOptions): FunctionChain<TemplateExecutor>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts `string`, as a whole, to lower case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the lower cased string.
|
||||
*/
|
||||
toLower(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toLower
|
||||
*/
|
||||
toLower(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toLower
|
||||
*/
|
||||
toLower(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts `string`, as a whole, to upper case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the upper cased string.
|
||||
*/
|
||||
toUpper(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toUpper
|
||||
*/
|
||||
toUpper(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toUpper
|
||||
*/
|
||||
toUpper(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Removes leading and trailing whitespace or specified characters from string.
|
||||
*
|
||||
* @param string The string to trim.
|
||||
* @param chars The characters to trim.
|
||||
* @return Returns the trimmed string.
|
||||
*/
|
||||
trim(string?: string, chars?: string): string;
|
||||
/**
|
||||
* @see _.trim
|
||||
*/
|
||||
trim(string: string, index: string | number, guard: object): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trim
|
||||
*/
|
||||
trim(chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trim
|
||||
*/
|
||||
trim(chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Removes trailing whitespace or specified characters from string.
|
||||
*
|
||||
* @param string The string to trim.
|
||||
* @param chars The characters to trim.
|
||||
* @return Returns the trimmed string.
|
||||
*/
|
||||
trimEnd(string?: string, chars?: string): string;
|
||||
/**
|
||||
* @see _.trimEnd
|
||||
*/
|
||||
trimEnd(string: string, index: string | number, guard: object): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trimEnd
|
||||
*/
|
||||
trimEnd(chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trimEnd
|
||||
*/
|
||||
trimEnd(chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Removes leading whitespace or specified characters from string.
|
||||
*
|
||||
* @param string The string to trim.
|
||||
* @param chars The characters to trim.
|
||||
* @return Returns the trimmed string.
|
||||
*/
|
||||
trimStart(string?: string, chars?: string): string;
|
||||
/**
|
||||
* @see _.trimStart
|
||||
*/
|
||||
trimStart(string: string, index: string | number, guard: object): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trimStart
|
||||
*/
|
||||
trimStart(chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trimStart
|
||||
*/
|
||||
trimStart(chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface TruncateOptions {
|
||||
/**
|
||||
* @see _.length
|
||||
*/
|
||||
length?: number | undefined;
|
||||
/**
|
||||
* @see _.omission
|
||||
*/
|
||||
omission?: string | undefined;
|
||||
/**
|
||||
* @see _.separator
|
||||
*/
|
||||
separator?: string | RegExp | undefined;
|
||||
}
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Truncates string if it’s longer than the given maximum string length. The last characters of the truncated
|
||||
* string are replaced with the omission string which defaults to "…".
|
||||
*
|
||||
* @param string The string to truncate.
|
||||
* @param options The options object or maximum string length.
|
||||
* @return Returns the truncated string.
|
||||
*/
|
||||
truncate(string?: string, options?: TruncateOptions): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.truncate
|
||||
*/
|
||||
truncate(options?: TruncateOptions): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.truncate
|
||||
*/
|
||||
truncate(options?: TruncateOptions): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* The inverse of _.escape; this method converts the HTML entities &, <, >, ", ', and `
|
||||
* in string to their corresponding characters.
|
||||
*
|
||||
* Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library
|
||||
* like he.
|
||||
*
|
||||
* @param string The string to unescape.
|
||||
* @return Returns the unescaped string.
|
||||
*/
|
||||
unescape(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.unescape
|
||||
*/
|
||||
unescape(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.unescape
|
||||
*/
|
||||
unescape(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts `string`, as space separated words, to upper case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the upper cased string.
|
||||
*/
|
||||
upperCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.upperCase
|
||||
*/
|
||||
upperCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.upperCase
|
||||
*/
|
||||
upperCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts the first character of `string` to upper case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the converted string.
|
||||
*/
|
||||
upperFirst(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.upperFirst
|
||||
*/
|
||||
upperFirst(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.upperFirst
|
||||
*/
|
||||
upperFirst(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Splits `string` into an array of its words.
|
||||
*
|
||||
* @param string The string to inspect.
|
||||
* @param pattern The pattern to match words.
|
||||
* @return Returns the words of `string`.
|
||||
*/
|
||||
words(string?: string, pattern?: string | RegExp): string[];
|
||||
/**
|
||||
* @see _.words
|
||||
*/
|
||||
words(string: string, index: string | number, guard: object): string[];
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.words
|
||||
*/
|
||||
words(pattern?: string | RegExp): Collection<string>;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.words
|
||||
*/
|
||||
words(pattern?: string | RegExp): CollectionChain<string>;
|
||||
}
|
||||
}
|
||||
+1220
File diff suppressed because it is too large
Load Diff
+2
@@ -0,0 +1,2 @@
|
||||
import { compact } from "./index";
|
||||
export = compact;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { concat } from "./index";
|
||||
export = concat;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { cond } from "./index";
|
||||
export = cond;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { conformsTo } from "./index";
|
||||
export = conformsTo;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { constant } from "./index";
|
||||
export = constant;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { countBy } from "./index";
|
||||
export = countBy;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { create } from "./index";
|
||||
export = create;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { curry } from "./index";
|
||||
export = curry;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { curryRight } from "./index";
|
||||
export = curryRight;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { debounce } from "./index";
|
||||
export = debounce;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { deburr } from "./index";
|
||||
export = deburr;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { defaultTo } from "./index";
|
||||
export = defaultTo;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { defaults } from "./index";
|
||||
export = defaults;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { defaultsDeep } from "./index";
|
||||
export = defaultsDeep;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { defer } from "./index";
|
||||
export = defer;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { delay } from "./index";
|
||||
export = delay;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { difference } from "./index";
|
||||
export = difference;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { differenceBy } from "./index";
|
||||
export = differenceBy;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { differenceWith } from "./index";
|
||||
export = differenceWith;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { divide } from "./index";
|
||||
export = divide;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { drop } from "./index";
|
||||
export = drop;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { dropRight } from "./index";
|
||||
export = dropRight;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { dropRightWhile } from "./index";
|
||||
export = dropRightWhile;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { dropWhile } from "./index";
|
||||
export = dropWhile;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { each } from "./index";
|
||||
export = each;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { eachRight } from "./index";
|
||||
export = eachRight;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { endsWith } from "./index";
|
||||
export = endsWith;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { entries } from "./index";
|
||||
export = entries;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { entriesIn } from "./index";
|
||||
export = entriesIn;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { eq } from "./index";
|
||||
export = eq;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { escape } from "./index";
|
||||
export = escape;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { escapeRegExp } from "./index";
|
||||
export = escapeRegExp;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { every } from "./index";
|
||||
export = every;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { extend } from "./index";
|
||||
export = extend;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { extendWith } from "./index";
|
||||
export = extendWith;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { fill } from "./index";
|
||||
export = fill;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { filter } from "./index";
|
||||
export = filter;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { find } from "./index";
|
||||
export = find;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { findIndex } from "./index";
|
||||
export = findIndex;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { findKey } from "./index";
|
||||
export = findKey;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { findLast } from "./index";
|
||||
export = findLast;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user