0.0.2 • Published 1 year ago

@ssts/wait v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Promise wait | Good for development.

One straight forward function that waits | Good for development purposes 😍

Install

npm i -D @ssts/wait

Import

import seniorWAIT from "@ssts/wait";

Use

async function handleSomething(): Promise<void> {
  await seniorWAIT(1000);   // in milliseconds
}

Arguments

Returns Promise\<void>

OrderParameterTypeDefault
1durationnumber5000 (ms)

Example

import seniorWAIT from "@ssts/wait";

const handleSomething = async (): Promise<void> => {
  try {
    console.log("waiting started");
    await seniorWAIT(2000);   // in milliseconds (2 seconds)
    console.log("waiting done");
    
    await doSomething();

  } catch (error) {
    console.error(error);
  }
}





Made With Chocolate By Senior Sedo 😎

Be Chocolateful 💙😍

ssts stands for senior-sedo-typescript 💙

So instead of @senior-sedo-typescript/promise-wait

@ssts/wait for simplicity sake 😍






0.0.2

1 year ago

0.0.1

1 year ago