Socket
Book a DemoInstallSign in
Socket

mostly-working-hours

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mostly-working-hours

Call a callback mostly during normal working hours

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
6
200%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

random

FAQs

Package last updated on 05 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts