block.js

1.1.1 • Public • Published

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 blockfunction 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.

Readme

Keywords

Package Sidebar

Install

npm i block.js

Weekly Downloads

2

Version

1.1.1

License

MIT

Last publish

Collaborators

  • joezheng