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

document-promises-pinkie

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

document-promises-pinkie - npm Package Compare versions

Comparing version 3.1.2 to 3.1.3

15

document-promises.js
import Promise from "pinkie-promise";
// thenfied document ready states
const thenify = (type, readyState) =>
new Promise(resolve => {
const listener = () => {
function thenify(type, readyState) {
return new Promise(function(resolve) {
const listener = function() {
if (readyState.test(document.readyState)) {

@@ -12,3 +12,3 @@ document.removeEventListener(type, listener);

}
};
}

@@ -19,6 +19,7 @@ document.addEventListener(type, listener);

});
}
// export thenfied parsed, contentLoaded, and loaded
export const parsed = thenify("readystatechange", /^(?:interactive|complete)$/);
export const contentLoaded = thenify("DOMContentLoaded", /^(?:interactive|complete)$/);
export const loaded = thenify("readystatechange", /^complete$/);
export var parsed = thenify("readystatechange", /^(?:interactive|complete)$/);
export var contentLoaded = thenify("DOMContentLoaded", /^(?:interactive|complete)$/);
export var loaded = thenify("readystatechange", /^complete$/);
{
"name": "document-promises-pinkie",
"version": "3.1.2",
"version": "3.1.3",
"description": "Document loading states as Promises",

@@ -5,0 +5,0 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com> (http://jonathantneal.com)",

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