Tabnine Logo For Javascript
waitOn
Code IndexAdd Tabnine to your IDE (free)

How to use
waitOn
function
in
wait-on

Best JavaScript code snippets using wait-on.waitOn(Showing top 2 results out of 315)

origin: DataDog/dd-trace-js

async function createServer (profilerEnabled, url) {
 const server = spawn(process.execPath, ['server'], {
  cwd: __dirname,
  env: {
   DD_PROFILING_ENABLED: String(profilerEnabled),
   PORT: url.port
  }
 })

 process.once('SIGINT', () => {
  server.kill('SIGINT')
 })

 await waitOn({
  timeout: 5000,
  resources: [url.href]
 })

 return server
}
origin: perry-mitchell/webdav-client

function waitOnFile(filename) {
  return new Promise(function(resolve, reject) {
    waitOn(
      {
        resources: [filename],
        interval: 50,
        timeout: 500,
        window: 0
      },
      function(err) {
        if (err) {
          return reject(err);
        }
        return resolve();
      }
    );
  });
}
wait-on(npm)waitOn

Most used wait-on functions

    Popular in JavaScript

    • yargs
      yargs the modern, pirate-themed, successor to optimist.
    • request
      Simplified HTTP request client.
    • fs
    • chalk
      Terminal string styling done right
    • aws-sdk
      AWS SDK for JavaScript
    • rimraf
      A deep deletion module for node (like `rm -rf`)
    • body-parser
      Node.js body parsing middleware
    • mocha
      simple, flexible, fun test framework
    • colors
      get colors in your node.js console
    • From CI to AI: The AI layer in your organization
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
    Get Tabnine for your IDE now