@neo-one/utils
Advanced tools
Comparing version 3.0.1-preview3 to 3.0.1-preview3.1
@@ -6,2 +6,6 @@ export declare const constants: { | ||
PRIVATE_NET_PUBLIC_KEY: string; | ||
PRIVATE_NET_ADDRESS: string; | ||
PRIVATE_NET_SCRIPT_HASH: string; | ||
PRIVATE_NET_CONSENSUS_ADDRESS: string; | ||
PRIVATE_NET_CONSENSUS_SCRIPT_HASH: string; | ||
}; |
@@ -9,4 +9,8 @@ "use strict"; | ||
PRIVATE_NET_PUBLIC_KEY: '0248be3c070df745a60f3b8b494efcc6caf90244d803a9a72fe95d9bae2120ec70', | ||
PRIVATE_NET_ADDRESS: 'NfZhRHq4fxKHcH8yidE3fubHVypbxc1Ht2', | ||
PRIVATE_NET_SCRIPT_HASH: '0xaf6e1dd6d44f5adff2f2973354abf831fd088dd7', | ||
PRIVATE_NET_CONSENSUS_ADDRESS: 'NfdKztHauMe8n8HnSbzCUZCNfQY7gToy2q', | ||
PRIVATE_NET_CONSENSUS_SCRIPT_HASH: '0x51b2dd775a36b91db9e6b79b39b536505ad13cd8', | ||
}; | ||
//# sourceMappingURL=constants.js.map |
declare function nullthrows<T>(value: T | null | undefined): T; | ||
declare function numCompAscending(a: number, b: number): -1 | 0 | 1; | ||
declare function numCompDescending(a: number, b: number): number; | ||
declare function assertNever(_value: never): void; | ||
@@ -10,2 +12,4 @@ declare function isPromise(value: any): value is Promise<{}>; | ||
nullthrows: typeof nullthrows; | ||
numCompAscending: typeof numCompAscending; | ||
numCompDescending: typeof numCompDescending; | ||
assertNever: typeof assertNever; | ||
@@ -12,0 +16,0 @@ notNull: typeof notNull; |
@@ -13,2 +13,14 @@ "use strict"; | ||
} | ||
function numCompAscending(a, b) { | ||
if (a < b) { | ||
return -1; | ||
} | ||
if (b < a) { | ||
return 1; | ||
} | ||
return 0; | ||
} | ||
function numCompDescending(a, b) { | ||
return numCompAscending(a, b) * -1; | ||
} | ||
function assertNever(_value) { | ||
@@ -28,2 +40,4 @@ } | ||
nullthrows, | ||
numCompAscending, | ||
numCompDescending, | ||
assertNever, | ||
@@ -30,0 +44,0 @@ notNull, |
@@ -6,2 +6,6 @@ export declare const constants: { | ||
PRIVATE_NET_PUBLIC_KEY: string; | ||
PRIVATE_NET_ADDRESS: string; | ||
PRIVATE_NET_SCRIPT_HASH: string; | ||
PRIVATE_NET_CONSENSUS_ADDRESS: string; | ||
PRIVATE_NET_CONSENSUS_SCRIPT_HASH: string; | ||
}; |
@@ -6,4 +6,8 @@ export const constants = { | ||
PRIVATE_NET_PUBLIC_KEY: '0248be3c070df745a60f3b8b494efcc6caf90244d803a9a72fe95d9bae2120ec70', | ||
PRIVATE_NET_ADDRESS: 'NfZhRHq4fxKHcH8yidE3fubHVypbxc1Ht2', | ||
PRIVATE_NET_SCRIPT_HASH: '0xaf6e1dd6d44f5adff2f2973354abf831fd088dd7', | ||
PRIVATE_NET_CONSENSUS_ADDRESS: 'NfdKztHauMe8n8HnSbzCUZCNfQY7gToy2q', | ||
PRIVATE_NET_CONSENSUS_SCRIPT_HASH: '0x51b2dd775a36b91db9e6b79b39b536505ad13cd8', | ||
}; | ||
//# sourceMappingURL=constants.js.map |
declare function nullthrows<T>(value: T | null | undefined): T; | ||
declare function numCompAscending(a: number, b: number): -1 | 0 | 1; | ||
declare function numCompDescending(a: number, b: number): number; | ||
declare function assertNever(_value: never): void; | ||
@@ -10,2 +12,4 @@ declare function isPromise(value: any): value is Promise<{}>; | ||
nullthrows: typeof nullthrows; | ||
numCompAscending: typeof numCompAscending; | ||
numCompDescending: typeof numCompDescending; | ||
assertNever: typeof assertNever; | ||
@@ -12,0 +16,0 @@ notNull: typeof notNull; |
@@ -9,2 +9,14 @@ import _ from 'lodash'; | ||
} | ||
function numCompAscending(a, b) { | ||
if (a < b) { | ||
return -1; | ||
} | ||
if (b < a) { | ||
return 1; | ||
} | ||
return 0; | ||
} | ||
function numCompDescending(a, b) { | ||
return numCompAscending(a, b) * -1; | ||
} | ||
function assertNever(_value) { | ||
@@ -24,2 +36,4 @@ } | ||
nullthrows, | ||
numCompAscending, | ||
numCompDescending, | ||
assertNever, | ||
@@ -26,0 +40,0 @@ notNull, |
{ | ||
"name": "@neo-one/utils", | ||
"version": "3.0.1-preview3", | ||
"version": "3.0.1-preview3.1", | ||
"description": "NEO•ONE shared utils.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
110978
1656
1