block.js
v1.1.1
Published
A function used to block the javascript for specify millisecond
Downloads
1
Readme
block.js
A simple javascript utility for blocking thread specified milliseconds
Block.js
You may have to simulate some operations take specified time, and Block.js is there for you.
Install with npm
npm install block.js --save
Use with webpack:
import block from 'block.js'
Usage
The block
function takes one argument which must be number as millisecond you want to block.
console.time('block about 400ms')
block(400)
console.timeEnd('block about 400ms')
License
MIT. Copyright (c) 2017 Joe Zheng.