intel
Advanced tools
Comparing version 1.0.0-b1 to 1.0.0-b1.1
@@ -99,3 +99,3 @@ /* This Source Code Form is subject to the terms of the Mozilla Public | ||
}); | ||
if (len > 1) { | ||
if (len > 0) { | ||
for (var x = args[i]; i < len; x = args[++i]) { | ||
@@ -115,3 +115,3 @@ str += ' ' + defaultFmt(x); | ||
var args = SLICE.call(arguments, 1); | ||
if (args.length > 1 || !OBJECT_FMT.test(format)) { | ||
if (!OBJECT_FMT.test(format)) { | ||
return printfArgs(format, args); | ||
@@ -118,0 +118,0 @@ } else { |
{ | ||
"name": "intel", | ||
"version": "1.0.0-b1", | ||
"version": "1.0.0-b1.1", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "bluebird": "~1.2.0", |
@@ -17,4 +17,4 @@ /* This Source Code Form is subject to the terms of the Mozilla Public | ||
assert.equal(printf('%s,%s,%d', 'a', 2, 3), 'a,2,3'); | ||
assert.equal(printf('%%s', 'a'), '%s'); | ||
assert.equal(printf('%Z', 'a'), '%Z'); | ||
assert.equal(printf('%%s', 'a'), '%s a'); | ||
assert.equal(printf('%Z', 'a'), '%Z a'); | ||
}, | ||
@@ -61,2 +61,3 @@ 'should print %O': function() { | ||
'should default print extra args without placeholders': function() { | ||
assert.equal(printf('foo', 'bar'), 'foo bar'); | ||
assert.equal( | ||
@@ -63,0 +64,0 @@ printf('%s =', 'abc', 3, false, { foo: 'bar' }), |
128453
2747