1.0.0 • Published 7 years ago
mostly-shopping-hours v1.0.0
mostly-shopping-hours
Call a callback only sometimes with a certian likelihood. The likelihood is higer during normal shopping hours, and really high on the weekend.
This is useful if you want to simulate load on a shopping site for instance.
based on https://github.com/watson/mostly-working-hours
Installation
npm install mostly-shopping-hours --save
Usage
var maybe = require('mostly-shopping-hours')
maybe(function () {
console.log('It\'s time to do some work!')
})
API
maybe(callback)
Will call the callback
only based on certain odds.
The odds are higest during normal shopping hours and lowest in the weekend.
License
MIT
1.0.0
7 years ago