How to use the console.warn function in console

To help you get started, we’ve selected a few console examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github davidflanagan / CoverMonkey / src / NodeApp.js View on Github external
// If file is null here look for a file name with the same basename
            // And alter the target in the array
            if (!file) {
                target = path.basename(target);

                for(var filename in data) {
                    if (path.basename(filename) === target) {
                        target = filename;
                        file = data[filename];
                        options.targets[index] = target;
                        break;
                    }
                }
                if (!file) {
                    console.warn("Unknown target file %s", target);
                    return; 
                }
            }

            var coverage = file.coverage();
            var covered = coverage[0];
            var partial = coverage[1];
            var uncovered = coverage[2];
            var dead = coverage[3];
            var lines = covered + partial + uncovered + dead;

            total.lines += lines;
            total.covered += covered;
            total.partial += partial;
            total.uncovered += uncovered;
            total.dead += dead;
github arangodb / arangodb / js / server / modules / @arangodb / cluster.js View on Github external
});
      console.debug('waitForSyncRepl', dbName, collName, shards, cinfo.shards, ccinfo);
      var ok = true;
      for (var i = 0; i < shards.length; ++i) {
	if (cinfo.shards[shards[i]].length !== ccinfo[i].length) {
	  ok = false;
	}
      }
      if (ok) {
	console.debug('waitForSyncRepl: OK:', dbName, collName, shards);
	return true;
      }
      require('internal').wait(1);
    }
  } catch (err) {
    console.warn('waitForSyncRepl:', dbName, collName, ': exception', JSON.stringify(err));
  }
  console.warn('waitForSyncRepl:', dbName, collName, ': BAD');
  return false;
}
github arangodb / arangodb / js / server / modules / @arangodb / cluster.js View on Github external
var ok = true;
      for (var i = 0; i < shards.length; ++i) {
	if (cinfo.shards[shards[i]].length !== ccinfo[i].length) {
	  ok = false;
	}
      }
      if (ok) {
	console.debug('waitForSyncRepl: OK:', dbName, collName, shards);
	return true;
      }
      require('internal').wait(1);
    }
  } catch (err) {
    console.warn('waitForSyncRepl:', dbName, collName, ': exception', JSON.stringify(err));
  }
  console.warn('waitForSyncRepl:', dbName, collName, ': BAD');
  return false;
}
github surmon-china / nodepress / src / todos / github.controller.bak.js View on Github external
forks: rep.forks,
                forks_count: rep.forks_count,
                description: rep.description || ' ',
                open_issues_count: rep.open_issues_count,
                stargazers_count: rep.stargazers_count,
                created_at: rep.created_at,
                language: rep.language
              }
            })
            return resolve(peojects)
          } catch (error) {
            console.warn('github 控制器解析为 JSON 失败', body)
            return reject(body)
          }
        } else {
          console.warn('项目列表获取失败', 'err:', err, 'body:', body)
          return reject(err)
        }
      })
    })

console

Returns `console` if present, otherwise returns a `noop`.

MIT
Latest version published 6 years ago

Package Health Score

54 / 100
Full package analysis