appolo-utils
Advanced tools
Comparing version 0.0.23 to 0.0.24
@@ -94,3 +94,3 @@ "use strict"; | ||
} | ||
static async to(promise) { | ||
static to(promise) { | ||
return promise.then(data => [null, data]).catch(e => [e]); | ||
@@ -97,0 +97,0 @@ } |
@@ -126,3 +126,3 @@ type Resolvable<R> = R | PromiseLike<R> | ||
public static async to<T, K>(promise: Promise<T>): Promise<[K, T?]> { | ||
public static to<T, K>(promise: Promise<T>): Promise<[K, T?]> { | ||
return promise.then(data => [null, data] as [K, T]).catch(e => [e] as [K, T?]) | ||
@@ -129,0 +129,0 @@ } |
@@ -17,3 +17,3 @@ { | ||
"main": "./index.js", | ||
"version": "0.0.23", | ||
"version": "0.0.24", | ||
"license": "MIT", | ||
@@ -20,0 +20,0 @@ "repository": { |
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
59705