mostly-working-hours

1.0.0 • Public • Published

mostly-working-hours

Call a callback only sometimes with a certian likelihood. The likelihood is higer during normal working hours, and really low in the weekend.

This is useful if you want to simulate load on a server for instance.

Build status js-standard-style

Installation

npm install mostly-working-hours --save

Usage

var maybe = require('mostly-working-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 working hours and lowest in the weekend.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    96
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    96

Package Sidebar

Install

npm i mostly-working-hours

Weekly Downloads

96

Version

1.0.0

License

MIT

Last publish

Collaborators

  • watson