JSPM

mostly-working-hours

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17
  • Score
    100M100P100Q55033F
  • License MIT

Call a callback mostly during normal working hours

Package Exports

  • mostly-working-hours

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mostly-working-hours) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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