obj-timeout

1.1.0 • Public • Published

obj-timeout

Object wrapper for setTimeout function

Why

It can be very useful if you're writing web applications using React.js.

let objTimeout = require('obj-timeout');

let App = React.createClass({
	waiter: null,
	componentDidMount: function() {
		this.waiter = new objTimeout(() => {
			console.log('waited')
		}, 2000);
	},
	componentWillUnmount: function() {
		this.waiter.destroy()
	},
	...
});

Readme

Keywords

Package Sidebar

Install

npm i obj-timeout

Weekly Downloads

0

Version

1.1.0

License

Apache-2

Last publish

Collaborators

  • grime2d