Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

should work now damnit!

  • Loading branch information...
commit 6c5afddfc42970a45561c9c08dc5d4140267a01e 1 parent be5bfce
@torvalamo authored
Showing with 3 additions and 22 deletions.
  1. +3 −3 argtype.js
  2. +0 −19 package.json
View
6 argtype.js
@@ -52,7 +52,7 @@ function _checkRecursive(args, list, array) {
return false // current is required
} else {
array.push(list[0].default)
- return _checkRecursive(args, list.slice(1), array, level + 1) // keep checking
+ return _checkRecursive(args, list.slice(1), array) // keep checking
}
}
if (!list.length) {
@@ -63,7 +63,7 @@ function _checkRecursive(args, list, array) {
// it is, continue recursing
var arr = array.length
array.push(args[0])
- if (_checkRecursive(args.slice(1), list.slice(1), array, level + 1)) {
+ if (_checkRecursive(args.slice(1), list.slice(1), array)) {
return true
}
array.splice(arr) // remove any potential added elements
@@ -71,7 +71,7 @@ function _checkRecursive(args, list, array) {
// no match, is it required? if not, skip
if (!list[0].required) {
array.push(list[0].default)
- return _checkRecursive(args, list.slice(1), array, level + 1)
+ return _checkRecursive(args, list.slice(1), array)
}
return false
}
View
19 package.json
@@ -1,19 +0,0 @@
-{ "name" : "argtype"
-, "description" : "JavaScript function arguments type checker"
-, "version" : "0.2.0"
-, "homepage" : "http://magnimedia.no/"
-, "author" : "Tor Valamo <tor.valamo@magimedia.no> (http://magnimedia.no/)"
-, "repository" :
- { "type" : "git"
- , "url" : "http://github.com/torvalamo/argtype.js.git"
- }
-, "bugs" :
- { "web" : "http://github.com/torvalamo/argtype.js/issues"
- }
-, "engines" : { "node" : ">=0.2.0" }
-, "licenses" :
- [ { "type" : "MIT"
- , "url" : "http://github.com/torvalamo/argtype.js/blob/master/COPYING"
- }
- ]
-}
Please sign in to comment.
Something went wrong with that request. Please try again.