@cardano-sdk/util
Advanced tools
Comparing version 0.10.0-test.0 to 0.10.0
@@ -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,5 @@ export * from './equals'; | ||
export * from './patchObject'; | ||
export * from './isPromise'; | ||
export * from './transformer'; | ||
export { PromiseOrValue, resolveObjectValues } from './util'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -35,4 +35,6 @@ "use strict"; | ||
__exportStar(require("./patchObject"), exports); | ||
__exportStar(require("./isPromise"), exports); | ||
__exportStar(require("./transformer"), 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,5 @@ export * from './equals'; | ||
export * from './patchObject'; | ||
export * from './isPromise'; | ||
export * from './transformer'; | ||
export { PromiseOrValue, resolveObjectValues } from './util'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -18,3 +18,5 @@ export * from './equals'; | ||
export * from './patchObject'; | ||
export * from './isPromise'; | ||
export * from './transformer'; | ||
export { resolveObjectValues } from './util'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@cardano-sdk/util", | ||
"version": "0.10.0-test.0", | ||
"version": "0.10.0", | ||
"description": "General, not cardano-specific utils", | ||
@@ -79,3 +79,3 @@ "engines": { | ||
], | ||
"gitHead": "3aaec0763242fa333e173babbbd21b1870b36de3" | ||
"gitHead": "8d30ed7e21e922c5f08d688eba0bf9014247aaaf" | ||
} |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
399468
176
1531
0
0