GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lib: replace sprintf-like format to template string literal by yosuke-furukawa · Pull Request #691 · nodejs/node

lib: replace sprintf-like format to template string literal #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yosuke-furukawa wants to merge 1 commit into nodejs:v1.x from yosuke-furukawa:use_template_literal

Uh oh!

There was an error while loading. Please reload this page.

Closed

lib: replace sprintf-like format to template string literal #691

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1 commit
Select commit
ad28e03
lib: replace sprintf-like format to template string literal
yosuke-furukawa Feb 2, 2015
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
lib: replace sprintf-like format to template string literal
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@yosuke-furukawa
yosuke-furukawa committed Feb 3, 2015
commit ad28e0356a4094bc4c315327dd61fb82f3dd6177

There are no files selected for viewing

2 changes: 1 addition & 1 deletion 2 lib/_debug_agent.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports.start = function start() {

agent.listen(process._debugAPI.port, function() {
var addr = this.address();
process._rawDebug('Debugger listening on port %d', addr.port);
process._rawDebug(`Debugger listening on port ${addr.port}`);
process._debugAPI.notifyListen();
});

Expand Down
4 changes: 2 additions & 2 deletions 4 lib/_http_server.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ function connectionListener(socket) {

function socketOnData(d) {
assert(!socket._paused);
debug('SERVER socketOnData %d', d.length);
debug(`SERVER socketOnData ${d.length}`);
var ret = parser.execute(d);
if (ret instanceof Error) {
debug('parse error');
Expand All @@ -337,7 +337,7 @@ function connectionListener(socket) {

var eventName = req.method === 'CONNECT' ? 'connect' : 'upgrade';
if (EventEmitter.listenerCount(self, eventName) > 0) {
debug('SERVER have listener for %s', eventName);
debug(`SERVER have listener for ${eventName}`);
var bodyHead = d.slice(bytesParsed, d.length);

// TODO(isaacs): Need a way to reset a stream to fresh state
Expand Down
16 changes: 8 additions & 8 deletions 16 lib/_tls_legacy.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ CryptoStream.prototype._write = function write(data, encoding, cb) {
// Write current buffer now
var written;
if (this === this.pair.cleartext) {
debug('cleartext.write called with %d bytes', data.length);
debug(`cleartext.write called with ${data.length} bytes`);
written = this.pair.ssl.clearIn(data, 0, data.length);
} else {
debug('encrypted.write called with %d bytes', data.length);
debug(`encrypted.write called with ${data.length} bytes`);
written = this.pair.ssl.encIn(data, 0, data.length);
}

Expand Down Expand Up @@ -215,9 +215,9 @@ CryptoStream.prototype._write = function write(data, encoding, cb) {
this._pendingCallback = cb;

if (this === this.pair.cleartext) {
debug('cleartext.write queued with %d bytes', data.length);
debug(`cleartext.write queued with ${data.length} bytes`);
} else {
debug('encrypted.write queued with %d bytes', data.length);
debug(`encrypted.write queued with ${data.length} bytes`);
}
};

Expand All @@ -244,10 +244,10 @@ CryptoStream.prototype._read = function read(size) {

var out;
if (this === this.pair.cleartext) {
debug('cleartext.read called with %d bytes', size);
debug(`cleartext.read called with ${size} bytes`);
out = this.pair.ssl.clearOut;
} else {
debug('encrypted.read called with %d bytes', size);
debug(`encrypted.read called with ${size} bytes`);
out = this.pair.ssl.encOut;
}

Expand Down Expand Up @@ -282,9 +282,9 @@ CryptoStream.prototype._read = function read(size) {
assert(bytesRead >= 0);

if (this === this.pair.cleartext) {
debug('cleartext.read succeed with %d bytes', bytesRead);
debug(`cleartext.read succeed with ${bytesRead} bytes`);
} else {
debug('encrypted.read succeed with %d bytes', bytesRead);
debug(`encrypted.read succeed with ${bytesRead} bytes`);
}

// Try writing pending data
Expand Down
6 changes: 2 additions & 4 deletions 6 lib/child_process.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1265,10 +1265,8 @@ function spawnSync(/*file, args, options*/) {
else if (util.isString(input))
pipe.input = new Buffer(input, options.encoding);
else
throw new TypeError(util.format(
'stdio[%d] should be Buffer or string not %s',
i,
typeof input));
throw new TypeError(
`stdio[${i}] should be Buffer or string not ${typeof input}`);
}
}

Expand Down
6 changes: 3 additions & 3 deletions 6 lib/events.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ EventEmitter.prototype.addListener = function addListener(type, listener) {
if (m && m > 0 && this._events[type].length > m) {
this._events[type].warned = true;
console.error('(node) warning: possible EventEmitter memory ' +
'leak detected. %d %s listeners added. ' +
'Use emitter.setMaxListeners() to increase limit.',
this._events[type].length, type);
`leak detected. ${this._events[type]} ${type} ` +
'listeners added. ' +
'Use emitter.setMaxListeners() to increase limit.');
console.trace();
}
}
Expand Down
8 changes: 4 additions & 4 deletions 8 lib/timers.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ function listOnTimeout() {
var msecs = this.msecs;
var list = this;

debug('timeout callback %d', msecs);
debug(`timeout callback ${msecs}`);

var now = Timer.now();
debug('now: %s', now);
debug('now: ' + now);

var diff, first, threw;
while (first = L.peek(list)) {
diff = now - first._idleStart;
if (diff < msecs) {
list.start(msecs - diff, 0);
debug('%d list wait because diff is %d', msecs, diff);
debug(`${msecs} list wait because diff is ${diff}`);
return;
} else {
L.remove(first);
Expand Down Expand Up @@ -107,7 +107,7 @@ function listOnTimeout() {
}
}

debug('%d list empty', msecs);
debug(`${msecs} list empty`);
assert(L.isEmpty(list));
list.close();
delete lists[msecs];
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/util.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ function timestamp() {

// log is just a thin wrapper to console.log that prepends a timestamp
exports.log = function() {
console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
console.log(`${timestamp()} - ${exports.format.apply(exports, arguments)}`);
};


Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.