New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

escape-stack

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

escape-stack - npm Package Compare versions

Comparing version

to
0.2.0

2

package.json
{
"name": "escape-stack",
"version": "0.1.2",
"version": "0.2.0",
"description": "A sweet way of handling things that close (or do other things) on escape",

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

@@ -9,6 +9,6 @@ var globalStack;

var key = e.keyCode ? e.keyCode : e.which;
var key = e.keyCode || e.which;
// yup i hard coded 27 sorry suckas
if (key === 27) {
while (!!stack.length && !(stack.pop())(e)) {}
pop(e);
}

@@ -30,4 +30,10 @@ }, true);

}
function pop(e) {
while (stack.length > 0 && !(stack.pop())(e)) {}
}
return {
add: addEscapeHandler
add: addEscapeHandler,
pop: pop
};

@@ -34,0 +40,0 @@ }