etcher-sdk / utils
- asCallback
- delay
- difference
- every
- fromCallback
- maxBy
- minBy
- once
- sparseStreamToBuffer
- streamToBuffer
- sumBy
▸ asCallback<T
>(promise
, callback
): Promise
<void
>
Name |
---|
T |
Name | Type |
---|---|
promise |
Promise <T > |
callback |
(error? : null | Error , value? : T ) => void |
Promise
<void
>
▸ delay(ms
): Promise
<void
>
Name | Type |
---|---|
ms |
number |
Promise
<void
>
▸ difference<T
>(setA
, setB
): Set
<T
>
Name |
---|
T |
Name | Type |
---|---|
setA |
Set <T > |
setB |
Set <T > |
Set
<T
>
▸ every<T
>(things
): boolean
Name |
---|
T |
Name | Type |
---|---|
things |
Iterable <T > |
boolean
▸ fromCallback<T
>(fn
): Promise
<T
>
Name |
---|
T |
Name | Type |
---|---|
fn |
(callback : (error? : null | Error , result? : T ) => void ) => void |
Promise
<T
>
▸ maxBy<T
>(things
, iteratee
): T
| undefined
Name |
---|
T |
Name | Type |
---|---|
things |
Iterable <T > |
iteratee |
(thing : T ) => number |
T
| undefined
▸ minBy<T
>(things
, iteratee
): T
| undefined
Name |
---|
T |
Name | Type |
---|---|
things |
Iterable <T > |
iteratee |
(thing : T ) => number |
T
| undefined
▸ once<T
>(fn
): () => T
Name |
---|
T |
Name | Type |
---|---|
fn |
() => T |
fn
▸ (): T
T
▸ sparseStreamToBuffer(stream
): Promise
<Buffer
>
Name | Type |
---|---|
stream |
ReadableStream |
Promise
<Buffer
>
▸ streamToBuffer(stream
): Promise
<Buffer
>
Name | Type |
---|---|
stream |
ReadableStream |
Promise
<Buffer
>
▸ sumBy<T
>(things
, iteratee
): number
Name |
---|
T |
Name | Type |
---|---|
things |
Iterable <T > |
iteratee |
(thing : T ) => number |
number