New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

delay-cmd

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delay-cmd - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

10

index.js
// time string is the desired delay time
module.exports = function(time) {
module.exports = async function(time) {
const delay = require('delay');
const humanInterval = require('human-interval');
async function start() {
console.log('waiting for' + time);
await delay(humanInterval(time));
}
start();
console.log('waiting for' + time);
await delay(humanInterval(time));
}

@@ -35,3 +35,3 @@ {

},
"version": "0.0.7"
"version": "0.0.8"
}

@@ -5,10 +5,46 @@ # delay-cmd

### Installation and Usage
### CLI Installation
```javascript
$ npm i delay-cmd -g
$ cd /c/your/project/folder
$ delay-cmd two hours && npm start
npm i delay-cmd -g
```
### CLI Usage
```javascript
delay-cmd five seconds
```
Put the command you want to delay after the `&&`.
```javascript
cd /c/path/to/yourProject
delay-cmd two hours && npm start
```
### node.js Usage
Must be used in an async function.
```javascript
const delayCmd = require('delay-cmd');
await delayCmd('five seconds');
```
I made `delay-cmd` as a CLI. For node.js use I recommend implementing this:
```javascript
//setup
const delay = require('delay');
const humanInterval = require('human-interval');
async function delayCmd(time) {
console.log('waiting for' + time);
await delay(humanInterval(time));
}
//usage
await delayCmd('five seconds');
```
### Donate!

@@ -15,0 +51,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc