Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cardano-sdk/util

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cardano-sdk/util - npm Package Compare versions

Comparing version 0.6.1-nightly.0 to 0.7.0-nightly.0

20

dist/cjs/freeable.js

@@ -43,2 +43,3 @@ "use strict";

_ManagedFreeableScope_scopeStack = new WeakMap(), _ManagedFreeableScope_disposed = new WeakMap();
const isPromise = (obj) => typeof obj === 'object' && typeof obj.then === 'function';
class AutoFree {

@@ -52,7 +53,22 @@ constructor(cb) {

execute() {
let result;
try {
return __classPrivateFieldGet(this, _AutoFree_callback, "f").call(this, __classPrivateFieldGet(this, _AutoFree_scope, "f"));
result = __classPrivateFieldGet(this, _AutoFree_callback, "f").call(this, __classPrivateFieldGet(this, _AutoFree_scope, "f"));
if (isPromise(result)) {
return result
.then((value) => {
__classPrivateFieldGet(this, _AutoFree_scope, "f").dispose();
return value;
})
.catch((error) => {
__classPrivateFieldGet(this, _AutoFree_scope, "f").dispose();
throw error;
});
}
__classPrivateFieldGet(this, _AutoFree_scope, "f").dispose();
return result;
}
finally {
catch (error) {
__classPrivateFieldGet(this, _AutoFree_scope, "f").dispose();
throw error;
}

@@ -59,0 +75,0 @@ }

@@ -39,2 +39,3 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {

_ManagedFreeableScope_scopeStack = new WeakMap(), _ManagedFreeableScope_disposed = new WeakMap();
const isPromise = (obj) => typeof obj === 'object' && typeof obj.then === 'function';
class AutoFree {

@@ -48,7 +49,22 @@ constructor(cb) {

execute() {
let result;
try {
return __classPrivateFieldGet(this, _AutoFree_callback, "f").call(this, __classPrivateFieldGet(this, _AutoFree_scope, "f"));
result = __classPrivateFieldGet(this, _AutoFree_callback, "f").call(this, __classPrivateFieldGet(this, _AutoFree_scope, "f"));
if (isPromise(result)) {
return result
.then((value) => {
__classPrivateFieldGet(this, _AutoFree_scope, "f").dispose();
return value;
})
.catch((error) => {
__classPrivateFieldGet(this, _AutoFree_scope, "f").dispose();
throw error;
});
}
__classPrivateFieldGet(this, _AutoFree_scope, "f").dispose();
return result;
}
finally {
catch (error) {
__classPrivateFieldGet(this, _AutoFree_scope, "f").dispose();
throw error;
}

@@ -55,0 +71,0 @@ }

4

package.json
{
"name": "@cardano-sdk/util",
"version": "0.6.1-nightly.0",
"version": "0.7.0-nightly.0",
"description": "General, not cardano-specific utils",

@@ -76,3 +76,3 @@ "engines": {

],
"gitHead": "01489cd2e4a1a1c8863fd654de4efc1ccf4db1d4"
"gitHead": "ed865b11749dab31502dc09e7cc76446ad268d2b"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc