Socket
Socket
Sign inDemoInstall

waitasecond

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

waitasecond - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

15

dist/functions/forAllImagesInElement.js

@@ -43,6 +43,19 @@ "use strict";

case 0: return [4 /*yield*/, Promise.all(Array.from(element.querySelectorAll('img')).map(function (imgElement) {
return new Promise(function (resolve) {
return new Promise(function (resolve, reject) {
if (imgElement.complete) {
if (imgElement.naturalHeight === 0) {
reject(imgElement);
}
else {
resolve();
}
return;
}
;
imgElement.addEventListener('load', function () {
resolve();
});
imgElement.addEventListener('error', function () {
reject(imgElement);
});
});

@@ -49,0 +62,0 @@ }))];

2

dist/main.d.ts

@@ -7,2 +7,2 @@ import { forAllImagesInElement } from './functions/forAllImagesInElement';

import { forValueDefined } from './functions/forValueDefined';
export { forAllImagesInElement, forAnimationFrame, forImmediate, forTime, forValueDefined, forDocumentLoad };
export { forAllImagesInElement, forAnimationFrame, forImmediate, forTime, forValueDefined, forDocumentLoad, };
{
"name": "waitasecond",
"version": "0.3.0",
"version": "0.3.1",
"description": "Simple tool library for the waiting using Promises.",

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

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