Skip to content

Commit 76e9d14

Browse files
author
Dave Pacheco
committed
#8 jsPrintf dicey use of arguments
1 parent 8189a85 commit 76e9d14

File tree

7 files changed

+5
-50
lines changed

7 files changed

+5
-50
lines changed

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
[submodule "deps/jsstyle"]
2-
path = deps/jsstyle
3-
url = git://github.com/davepacheco/jsstyle
4-
[submodule "deps/javascriptlint"]
5-
path = deps/javascriptlint
6-
url = git://github.com/davepacheco/javascriptlint

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#
1212
# Files
1313
#
14+
JSL = jsl
15+
JSSTYLE = jsstyle
1416
JS_FILES := $(shell find lib -name '*.js')
1517
JSL_FILES_NODE = $(JS_FILES)
1618
JSSTYLE_FILES = $(JS_FILES)
@@ -19,5 +21,4 @@ JSL_CONF_NODE = jsl.node.conf
1921
# Default target is "check"
2022
check:
2123

22-
include ./Makefile.deps
2324
include ./Makefile.targ

Makefile.deps

Lines changed: 0 additions & 39 deletions
This file was deleted.

deps/javascriptlint

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/jsstyle

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/extsprintf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ function jsSprintf(fmt)
133133
}
134134

135135
function jsPrintf() {
136-
process.stdout.write(jsSprintf.apply(this, arguments));
136+
var args = Array.prototype.slice.call(arguments);
137+
process.stdout.write(jsSprintf.apply(this, args));
137138
}
138139

139140
function doPad(chr, width, left, str)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "extsprintf",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "extended POSIX-style sprintf",
55
"main": "./lib/extsprintf.js",
66
"repository": {

0 commit comments

Comments
 (0)