How to use the console.error 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 nickcmaynard / jsonschemalint / draft4 / js / is-my-json-valid / is-my-json-valid.js View on Github external
debugs[set] = function() {
        var msg = exports.format.apply(exports, arguments);
        console.error('%s %d: %s', set, pid, msg);
      };
    } else {
github arangodb / arangodb / js / server / modules / org / arangodb / actions.js View on Github external
function errorFunction (route, message) {
  'use strict';

  message += "\nThis error was triggered by the following route " + JSON.stringify(route);

  console.error("%s", message);

  return function (req, res, options, next) {
    res.responseCode = exports.HTTP_SERVER_ERROR;
    res.contentType = "text/plain";
    res.body = message;
  };
}

console

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

MIT
Latest version published 6 years ago

Package Health Score

54 / 100
Full package analysis