@prosopo/util
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -33,2 +33,4 @@ export declare const sleep: (ms: number) => Promise<unknown>; | ||
export declare const isObject: (value: unknown) => boolean; | ||
export type Hash = string | number[]; | ||
export declare const hashToHex: (hash: Hash) => string; | ||
//# sourceMappingURL=util.d.ts.map |
@@ -0,1 +1,2 @@ | ||
import { u8aToHex } from '@polkadot/util'; | ||
export const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | ||
@@ -149,2 +150,8 @@ export function* permutations(bins, options) { | ||
}; | ||
export const hashToHex = (hash) => { | ||
if (isArray(hash)) { | ||
return u8aToHex(new Uint8Array(hash)); | ||
} | ||
return hash.toString(); | ||
}; | ||
//# sourceMappingURL=util.js.map |
{ | ||
"name": "@prosopo/util", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"author": "PROSOPO LIMITED <info@prosopo.io>", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
766926
4560