Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@youngbeen/sleep

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@youngbeen/sleep

Turn setTimeout into a promisefy way

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
11
10%
Maintainers
1
Weekly downloads
 
Created
Source

[TOC]

Sleep

Ever think about use setTimeout like promise? Here it is.

Features

  • Friendly api as promise
  • Light like feather(only 365B)

Install

Install it via npm

npm install @youngbeen/sleep

Import

import { sleep } from '@youngbeen/sleep'

Usage

sleep(2000).then(() => {
  // run after 2 seconds
})

Keywords

javascript

FAQs

Package last updated on 02 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts