// Displays the result object directly markdownlint(options, function callback(err, result) { if (!err) { console.dir(result, { "colors": true, "depth": null }); } });
api.sbot.async.getLatest(id, (err, val) => { if (err) { console.dir(err) } else { if (val) { lastActivity.set(val) } } })
console.dir(redactedConfig, { depth: null })
monitor.once('initialized', function() { tap.test('Environment Data', function(t) { var nodeEnv = monitor.getEnvironment(); console.log('Got initialized event!'); console.dir(nodeEnv); runNodeEnvTests(nodeEnv, t); runCommonEnvTests(nodeEnv, t); t.end(); }); });
/** * Checks if there where errors on the browser console. * If yes, this will kill the process */ async function assertNoErrors(t) { const logs = await t.getBrowserConsoleMessages(); console.log('logs:'); console.dir(logs); if (logs.error.length > 0) { console.log('assertNoErrors got ' + logs.error.length + ' errors:'); console.dir(logs.error); process.kill(process.pid); } }
initPromiseRejectionWarningHandler() { // https://qiita.com/syuilo/items/0800d7e44e93203c7285 process.on('unhandledRejection', console.dir); // eslint-disable-line no-console }
// Fancy console.log function output (err, data) { console.dir (err || data, { depth: null, colors: true }); }
normarlize(data) { const { ctx } = this ctx.app.model.showAllSchemas().then(console.dir) // console.log('schame') // console.dir(ctx.app.model.User.schema()) ctx.type = 'json' // ctx.body = { // data, // model: Object.keys(this.ctx.model.models) // } ctx.body = data }
figlet('KickThemOut', function (err, logo) { if (err) { console.log('Something went wrong...') console.dir(err) return } var credits = chalk.yellow(' === Kick Devices off your LAN (' + chalk.red('KickThemOut v' + pkg.version) + ') ===\n') + chalk.yellow(' === Made with', chalk.red('\u2764'), 'by', chalk.blue('Rocco Musolino'), '(roccomuso) ===') cb(null, chalk.magenta(logo) + '\n' + credits + '\n\n') // then print logo con console })
// Look for the user _data.read('users', userId, (err, userData) => { if (!err && userData) { // Remove hashed password delete userData.hashedPassword; // Print the JSON with text highligthing cli.verticalSpace(); console.dir(userData, {colors: true}); cli.verticalSpace(); } });
UserService .findAll() .then(function (users) { console.dir(users); }) .catch(function (err) { console.error(err && err.stack ? err.stack : err); });
// 사용자 인증 이후 사용자 요청 시마다 호출 // user -> 사용자 인증 성공 시 serializeUser 메소드를 이용해 만들었던 세션 정보가 파라미터로 넘어온 것임 passport.deserializeUser(function(user, done) { console.log('deserializeUser() 호출됨.'); console.dir(user); // 사용자 정보 중 id나 email만 있는 경우 사용자 정보 조회 필요 - 여기에서는 user 객체 전체를 패스포트에서 관리 // 두 번째 파라미터로 지정한 사용자 정보는 req.user 객체로 복원됨 // 여기에서는 파라미터로 받은 user를 별도로 처리하지 않고 그대로 넘겨줌 done(null, user); });
/* eslint-env mocha, browser */ /* global proclaim */ describe('console', function () { it('dir()', function () { proclaim.doesNotThrow(function () { console.dir(); }); }); });
figlet(config.app_title, function (err, data) { if (err) { console.log('Something went wrong...') console.dir(err) return } module_callback(data) // then print logo con console })
React.createClass({ displayName: "Content", componentWillMount() { console.log(ReactDOM.findDOMNode(this)); }, componentDidMount() { console.dir(ReactDOM.findDOMNode(this)); }, render: function () { return React.createElement("div", null); } })