From 86a9bb2cf2289ec4bd9b703c1c6bd9883cf58f5c Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Wed, 4 Nov 2015 19:00:48 -0600 Subject: [PATCH 1/2] Avoid reserved keyword arguments This parameter named arguments is obscured by the special arguments object anyway. Including it in the function signature does nothing except make the code violate strict mode --- lib/vargs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vargs.js b/lib/vargs.js index ae801bd..a8feb7a 100644 --- a/lib/vargs.js +++ b/lib/vargs.js @@ -21,7 +21,7 @@ // args.array // all arguments, including callback // } // -exports.Constructor = function Vargs(arguments) { +exports.Constructor = function Vargs() { this.array = Array.prototype.slice.call(arguments); this.__defineGetter__('length', function () { if (this.callbackGiven()) { From 5587d9a0a63e5fa09710e23f3d147e1cfb39c938 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Wed, 4 Nov 2015 19:09:57 -0600 Subject: [PATCH 2/2] Add a package.json so I can bump the version number --- package.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..554f066 --- /dev/null +++ b/package.json @@ -0,0 +1,14 @@ +{ + "name": "vargs", + "version": "0.1.1", + "description": "variable argument handling for functions taking a callback", + "repository": { + "type": "git", + "url": "https://github.com/cloudhead/vargs" + }, + "author": "Alexis Sellier", + "bugs": { + "url": "https://github.com/cloudhead/vargs/issues" + }, + "homepage": "https://github.com/cloudhead/vargs" +}