Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
util: refactor format method.
Fix lint error: Infix operators must be spaced
  • Loading branch information
jesus-seijas-sp committed Apr 15, 2017
commit 9d032c24213139d1ce653d19cd2bc68a20b66abb
4 changes: 2 additions & 2 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ exports.format = function(f) {
var value;
while (i < f.length) {
if (f.charCodeAt(i) === 37/*'%'*/ && i + 1 < f.length) {
if (f.charCodeAt(i+1) === 37 || a < argLen) {
switch (f.charCodeAt(i+1)) {
if (f.charCodeAt(i + 1) === 37 || a < argLen) {
switch (f.charCodeAt(i + 1)) {
case 100/*'d'*/: value = Number(arguments[a++]); break;
case 105/*'i'*/: value = parseInt(arguments[a++]); break;
case 102/*'f'*/: value = parseFloat(arguments[a++]); break;
Expand Down