@cardano-sdk/util
Advanced tools
Comparing version 0.9.1-nightly.0 to 0.9.1-nightly.1
@@ -16,2 +16,3 @@ "use strict"; | ||
exports.usingAutoFree = exports.ManagedFreeableScope = void 0; | ||
const isPromise_1 = require("./isPromise"); | ||
class ManagedFreeableScope { | ||
@@ -44,3 +45,2 @@ constructor() { | ||
_ManagedFreeableScope_scopeStack = new WeakMap(), _ManagedFreeableScope_disposed = new WeakMap(); | ||
const isPromise = (obj) => typeof obj === 'object' && typeof obj.then === 'function'; | ||
class AutoFree { | ||
@@ -57,3 +57,3 @@ constructor(cb) { | ||
result = __classPrivateFieldGet(this, _AutoFree_callback, "f").call(this, __classPrivateFieldGet(this, _AutoFree_scope, "f")); | ||
if (isPromise(result)) { | ||
if ((0, isPromise_1.isPromise)(result)) { | ||
return result | ||
@@ -60,0 +60,0 @@ .then((value) => { |
@@ -18,3 +18,4 @@ export * from './equals'; | ||
export * from './patchObject'; | ||
export * from './isPromise'; | ||
export { PromiseOrValue, resolveObjectValues } from './util'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -35,4 +35,5 @@ "use strict"; | ||
__exportStar(require("./patchObject"), exports); | ||
__exportStar(require("./isPromise"), exports); | ||
var util_1 = require("./util"); | ||
Object.defineProperty(exports, "resolveObjectValues", { enumerable: true, get: function () { return util_1.resolveObjectValues; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -13,2 +13,3 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { | ||
var _ManagedFreeableScope_scopeStack, _ManagedFreeableScope_disposed, _AutoFree_scope, _AutoFree_callback; | ||
import { isPromise } from './isPromise'; | ||
export class ManagedFreeableScope { | ||
@@ -40,3 +41,2 @@ constructor() { | ||
_ManagedFreeableScope_scopeStack = new WeakMap(), _ManagedFreeableScope_disposed = new WeakMap(); | ||
const isPromise = (obj) => typeof obj === 'object' && typeof obj.then === 'function'; | ||
class AutoFree { | ||
@@ -43,0 +43,0 @@ constructor(cb) { |
@@ -18,3 +18,4 @@ export * from './equals'; | ||
export * from './patchObject'; | ||
export * from './isPromise'; | ||
export { PromiseOrValue, resolveObjectValues } from './util'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -18,3 +18,4 @@ export * from './equals'; | ||
export * from './patchObject'; | ||
export * from './isPromise'; | ||
export { resolveObjectValues } from './util'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@cardano-sdk/util", | ||
"version": "0.9.1-nightly.0", | ||
"version": "0.9.1-nightly.1", | ||
"description": "General, not cardano-specific utils", | ||
@@ -56,3 +56,3 @@ "engines": { | ||
"devDependencies": { | ||
"@cardano-sdk/util-dev": "^0.9.1-nightly.0", | ||
"@cardano-sdk/util-dev": "^0.9.1-nightly.1", | ||
"@types/lodash": "^4.14.182", | ||
@@ -81,3 +81,3 @@ "eslint": "^7.32.0", | ||
], | ||
"gitHead": "9f1115147bab32e1d5de3c59fe98854a38db8ae8" | ||
"gitHead": "8785b8df8ab6840d28b9a27fbda76223eb653764" | ||
} |
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
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
390681
168
1458