Socket
Book a DemoInstallSign in
Socket

as-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

as-sleep

Sleep function for AssemblyScript

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

AS-Sleep 😴

Installation

~ npm install as-sleep

Features

  • Works on all platforms
  • Fast and small
  • Made in pure AS
  • Synchronous/Callback

Usage

Synchronous

import { sleep } from 'as-sleep'

console.log('Sleeping for 2.3 seconds.')

sleep(2300)
// Sleep for 2.3 seconds 💤
console.log('Slept for 2.3 seconds.)

Callback

import { sleepCallback } from 'as-sleep'

console.log('Sleeping for 2.3 seconds.')

sleepCallback(() => {
    // Sleep for 2.3 seconds 💤
    console.log('Slept for 2.3 seconds.)
}, 2300)

Keywords

sleep

FAQs

Package last updated on 25 May 2021

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