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

dialog-promise

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dialog-promise - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

21

lib/dialog-promise.js

@@ -96,5 +96,10 @@ "use strict";

};
var closeWindowWithEmptyAnswer = opts.reject?(
function(){ closeWindow(new Error(DialogPromise.messages.Escaped)); }
):closeWindow.bind(null,opts.closeValue);
var closeWindowWithEmptyAnswer;
if(opts.reject){
var error=new Error(DialogPromise.messages.Escaped);
error.DialogPromise='Escaped';
closeWindowWithEmptyAnswer = function(){ closeWindow(error); }
}else{
closeWindowWithEmptyAnswer = closeWindow.bind(null,opts.closeValue);
}
dialogPromise.addCloseButton[opts.withCloseButton](dialogWindow, closeWindowWithEmptyAnswer);

@@ -235,3 +240,5 @@ dialogConstructor(dialogWindow, closeWindow);

if(!result && opts.reject){
throw new Error(DialogPromise.messages.NotConfirmed);
var error=new Error(DialogPromise.messages.NotConfirmed);
error.DialogPromise='NotConfirmed';
throw error;
}

@@ -289,3 +296,7 @@ if(askForNoRepeat && checkbox.checked){

if(buttonDef.value===false && (opts.rejectWhenCancelPrompt===true || opts.rejectWhenCancelPrompt===null && opts.reject)){
Object.defineProperty(buttonDef, 'value', { get: function(){ return new Error(DialogPromise.messages.Escaped); }});
Object.defineProperty(buttonDef, 'value', { get: function(){
var error=new Error(DialogPromise.messages.Escaped);
error.DialogPromise='Escaped';
return error;
}});
}

@@ -292,0 +303,0 @@ });

{
"name": "dialog-promise",
"description": "Dialog that returns promises",
"version": "0.6.2",
"version": "0.6.3",
"author": "Codenautas <codenautas@googlegroups.com>",

@@ -15,3 +15,3 @@ "repository": "codenautas/dialog-promise",

"devDependencies": {
"casperjs": "~1.1.3",
"casperjs": "~1.1.4",
"es6-promise": "~4.1.0",

@@ -36,1 +36,2 @@ "phantomjs-prebuilt": "~2.1.14",

}
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