appolo-utils
Advanced tools
Comparing version 0.0.52 to 0.0.53
@@ -56,4 +56,12 @@ "use strict"; | ||
} | ||
static to(fn) { | ||
try { | ||
return [null, fn()]; | ||
} | ||
catch (e) { | ||
return [e]; | ||
} | ||
} | ||
} | ||
exports.Functions = Functions; | ||
//# sourceMappingURL=functions.js.map |
@@ -70,2 +70,10 @@ import {Arrays} from "./arrays"; | ||
public static to<T, K>(fn: Function): [K, T?] { | ||
try { | ||
return [null, fn()] | ||
} catch (e) { | ||
return [e] | ||
} | ||
} | ||
} |
@@ -17,3 +17,3 @@ { | ||
"main": "./index.js", | ||
"version": "0.0.52", | ||
"version": "0.0.53", | ||
"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
115546
2075