Socket
Socket
Sign inDemoInstall

silent-promise

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

1

dist/index.d.ts
export { promisify } from "util";
export { SilentPromiseError } from "./silent-promise-error";
export { default as PromiseError } from "./silent-promise-error";
import PromiseError from "./promise-error";

@@ -4,0 +5,0 @@ export declare class SilentPromise<T> extends Promise<[PromiseError, T | undefined]> {

3

dist/index.js

@@ -10,2 +10,4 @@ "use strict";

exports.SilentPromiseError = silent_promise_error_1.SilentPromiseError;
var silent_promise_error_2 = require("./silent-promise-error");
exports.PromiseError = silent_promise_error_2.default;
const promise_error_1 = __importDefault(require("./promise-error"));

@@ -34,3 +36,2 @@ class SilentPromise extends Promise {

const wrapFn = getSilentPromiseFunction(fn, getBindArgument(bind) || bind);
console.log(bind);
Object.setPrototypeOf(wrapFn, Object.getPrototypeOf(fn));

@@ -37,0 +38,0 @@ return Object.defineProperties(wrapFn, Object.getOwnPropertyDescriptors(fn));

export { promisify } from "util";
export { SilentPromiseError } from "./silent-promise-error";
export { default as PromiseError } from "./silent-promise-error";
import PromiseError from "./promise-error";

@@ -4,0 +5,0 @@ export declare class SilentPromise<T> extends Promise<[PromiseError, T | undefined]> {

@@ -10,2 +10,4 @@ "use strict";

exports.SilentPromiseError = silent_promise_error_1.SilentPromiseError;
var silent_promise_error_2 = require("./silent-promise-error");
exports.PromiseError = silent_promise_error_2.default;
const promise_error_1 = __importDefault(require("./promise-error"));

@@ -34,3 +36,2 @@ class SilentPromise extends Promise {

const wrapFn = getSilentPromiseFunction(fn, getBindArgument(bind) || bind);
console.log(bind);
Object.setPrototypeOf(wrapFn, Object.getPrototypeOf(fn));

@@ -37,0 +38,0 @@ return Object.defineProperties(wrapFn, Object.getOwnPropertyDescriptors(fn));

{
"name": "silent-promise",
"version": "0.0.1",
"version": "0.0.2",
"description": "Make a promise fail silently. For use with async/await for easy error handling without try-catch",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

export { promisify } from "util";
export { SilentPromiseError } from "./silent-promise-error";
export { default as PromiseError } from "./silent-promise-error";

@@ -54,3 +55,2 @@ import PromiseError from "./promise-error";

const wrapFn = getSilentPromiseFunction(fn, getBindArgument(bind) || bind);
console.log(bind);
Object.setPrototypeOf(wrapFn, Object.getPrototypeOf(fn));

@@ -57,0 +57,0 @@ return Object.defineProperties(wrapFn, Object.getOwnPropertyDescriptors(fn));

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc