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

aforwait

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aforwait - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

readme.md

27

lib/index.js

@@ -0,1 +1,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.aforInfinit = exports.aforDecades = exports.aforYears = exports.aforDays = exports.aforHours = exports.aforMin = exports.aforSec = void 0;
const ms = 1;

@@ -6,3 +9,3 @@ /**

*/
export default function afor(time) {
function afor(time) {
return new Promise((solve) => {

@@ -12,2 +15,3 @@ globalThis.setTimeout(solve, time * ms);

}
exports.default = afor;
const sec = 1000;

@@ -18,3 +22,3 @@ /**

*/
export function aforSec(time) {
function aforSec(time) {
return new Promise((solve) => {

@@ -24,2 +28,3 @@ globalThis.setTimeout(solve, time * sec);

}
exports.aforSec = aforSec;
const min = sec * 60;

@@ -30,3 +35,3 @@ /**

*/
export function aforMin(time) {
function aforMin(time) {
return new Promise((solve) => {

@@ -36,2 +41,3 @@ globalThis.setTimeout(solve, time * min);

}
exports.aforMin = aforMin;
const hour = min * 60;

@@ -42,3 +48,3 @@ /**

*/
export function aforHours(time) {
function aforHours(time) {
return new Promise((solve) => {

@@ -48,2 +54,3 @@ globalThis.setTimeout(solve, time * hour);

}
exports.aforHours = aforHours;
const day = hour * 24;

@@ -54,3 +61,3 @@ /**

*/
export function aforDays(time) {
function aforDays(time) {
return new Promise((solve) => {

@@ -60,2 +67,3 @@ globalThis.setTimeout(solve, time * day);

}
exports.aforDays = aforDays;
const year = day * 356;

@@ -66,3 +74,3 @@ /**

*/
export function aforYears(time) {
function aforYears(time) {
return new Promise((solve) => {

@@ -72,2 +80,3 @@ globalThis.setTimeout(solve, time * year);

}
exports.aforYears = aforYears;
const decade = year * 10;

@@ -78,3 +87,3 @@ /**

*/
export function aforDecades(time) {
function aforDecades(time) {
return new Promise((solve) => {

@@ -84,2 +93,3 @@ globalThis.setTimeout(solve, time * decade);

}
exports.aforDecades = aforDecades;
const infinit = decade * Infinity;

@@ -90,3 +100,3 @@ /**

*/
export function aforInfinit(time) {
function aforInfinit(time) {
return new Promise((solve) => {

@@ -96,1 +106,2 @@ globalThis.setTimeout(solve, time * infinit);

}
exports.aforInfinit = aforInfinit;

@@ -1,6 +0,20 @@

import aforwait from "./index.js";
(async () => {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const index_js_1 = __importDefault(require("./index.js"));
(() => __awaiter(void 0, void 0, void 0, function* () {
console.log("i'm gonna wait 5 seconds and then tell you yee");
await aforwait(5000);
yield index_js_1.default(5000); // await aforSec(5);
console.log("yee");
})();
}))();
{
"name": "aforwait",
"version": "1.0.1",
"version": "1.0.2",
"description": "",

@@ -5,0 +5,0 @@ "type": "module",

@@ -5,4 +5,4 @@ {

"moduleResolution": "node",
"module": "ES2020",
"target": "ESNext",
"module": "CommonJS",
"target": "ES6",
"outDir": "lib",

@@ -9,0 +9,0 @@ "declaration": true,

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