Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

should work now damnit!

  • Loading branch information...
commit 6c5afddfc42970a45561c9c08dc5d4140267a01e 1 parent be5bfce
Tor Valamo authored

Showing 2 changed files with 3 additions and 22 deletions. Show diff stats Hide diff stats

  1. +3 3 argtype.js
  2. +0 19 package.json
6 argtype.js
@@ -52,7 +52,7 @@ function _checkRecursive(args, list, array) {
52 52 return false // current is required
53 53 } else {
54 54 array.push(list[0].default)
55   - return _checkRecursive(args, list.slice(1), array, level + 1) // keep checking
  55 + return _checkRecursive(args, list.slice(1), array) // keep checking
56 56 }
57 57 }
58 58 if (!list.length) {
@@ -63,7 +63,7 @@ function _checkRecursive(args, list, array) {
63 63 // it is, continue recursing
64 64 var arr = array.length
65 65 array.push(args[0])
66   - if (_checkRecursive(args.slice(1), list.slice(1), array, level + 1)) {
  66 + if (_checkRecursive(args.slice(1), list.slice(1), array)) {
67 67 return true
68 68 }
69 69 array.splice(arr) // remove any potential added elements
@@ -71,7 +71,7 @@ function _checkRecursive(args, list, array) {
71 71 // no match, is it required? if not, skip
72 72 if (!list[0].required) {
73 73 array.push(list[0].default)
74   - return _checkRecursive(args, list.slice(1), array, level + 1)
  74 + return _checkRecursive(args, list.slice(1), array)
75 75 }
76 76 return false
77 77 }
19 package.json
... ... @@ -1,19 +0,0 @@
1   -{ "name" : "argtype"
2   -, "description" : "JavaScript function arguments type checker"
3   -, "version" : "0.2.0"
4   -, "homepage" : "http://magnimedia.no/"
5   -, "author" : "Tor Valamo <tor.valamo@magimedia.no> (http://magnimedia.no/)"
6   -, "repository" :
7   - { "type" : "git"
8   - , "url" : "http://github.com/torvalamo/argtype.js.git"
9   - }
10   -, "bugs" :
11   - { "web" : "http://github.com/torvalamo/argtype.js/issues"
12   - }
13   -, "engines" : { "node" : ">=0.2.0" }
14   -, "licenses" :
15   - [ { "type" : "MIT"
16   - , "url" : "http://github.com/torvalamo/argtype.js/blob/master/COPYING"
17   - }
18   - ]
19   -}

0 comments on commit 6c5afdd

Please sign in to comment.
Something went wrong with that request. Please try again.