Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf6b56a

Browse files
committed
bugfixes
2 parents727b30f +99baac2 commitdf6b56a

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"url":"https://github.com/alexei/sprintf.js.git"
1515
},
1616
"author":"Alexandru Marasteanu <hello@alexei.ro> (http://alexei.ro/)",
17-
"license":"BSD",
17+
"license":"BSD-3-Clause",
1818
"readmeFilename":"README.md",
1919
"devDependencies": {
2020
"mocha":"*",

‎src/sprintf.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
arg=argv[cursor++]
4646
}
4747

48-
if(re.not_string.test(match[8])&&(get_type(arg)!="number")){
48+
if(re.not_string.test(match[8])&&(get_type(arg)!="number"&&isNaN(arg))){
4949
thrownewTypeError(sprintf("[sprintf] expecting number but found %s",get_type(arg)))
5050
}
5151
switch(match[8]){

‎src/sprintf.min.js‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎src/sprintf.min.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎test/test.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ describe("sprintfjs", function() {
99
assert.equal("10",sprintf("%b",2))
1010
assert.equal("A",sprintf("%c",65))
1111
assert.equal("2",sprintf("%d",2))
12+
assert.equal("2",sprintf("%d","2"))
1213
assert.equal("2e+0",sprintf("%e",2))
1314
assert.equal("2",sprintf("%u",2))
1415
assert.equal("4294967294",sprintf("%u",-2))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp