1.0.5 • Published 9 years ago

sleep-deep v1.0.5

Weekly downloads
2
License
ISC
Repository
-
Last release
9 years ago

Sleep-Deep

Just, Sleep

npm install sleep-deep
const sleep = require('sleep-deep');

sleep(5000) // Sleep ( 5 * 1000 miliseconds ) 
	.then(() => console.log(`I'm awake !`))
	.then(eat)
	.then(goToWork)
	.catch(late)


function eat() {
	console.log(`eat !`);
}

function goToWork() {
	console.log(`Work !`)
	throw new Error("Late!")
}

function late() {
	process.stderr.write(`late !`)
}

Reasons to use

  • Easy to use
  • Use Promises
  • Size is only 3 KB
  • Simple API to write asynchronous code
1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago