Sleep MS is primarily a command-line tool that emulates BASH SLEEP command using NodeJS.
First and foremost, it provides the ability to stall execution in milliseconds. SLEEP command supports seconds only (unless you install bash with loadable sleep). Secondly, a number of CI platforms do not support sleep within scripts, but if you are on NodeJS stack, you can easily utilise this module to overcome this limitation.
npm install sleep-ms --save;
# sleep for 1 secondsleepms 1000;
It is recommended that you do a global install using
npm install sleep-ms -g;
Using the JS API
Usually there would not be any need to use this since using
var sleepms = ;// sleep for one second;