diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/call-matcher/index.js | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) |
update packages
Diffstat (limited to 'node_modules/call-matcher/index.js')
-rw-r--r-- | node_modules/call-matcher/index.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/node_modules/call-matcher/index.js b/node_modules/call-matcher/index.js index 24163e354..a234a4b93 100644 --- a/node_modules/call-matcher/index.js +++ b/node_modules/call-matcher/index.js @@ -4,7 +4,7 @@ * * https://github.com/twada/call-matcher * - * Copyright (c) 2015-2016 Takuto Wada + * Copyright (c) 2015-2018 Takuto Wada * Licensed under the MIT license. * https://github.com/twada/call-matcher/blob/master/MIT-LICENSE.txt */ @@ -109,15 +109,17 @@ CallMatcher.prototype.isSameDepthAsSignatureCallee = function (ast) { return (depth === currentDepth); }; -function toArgumentSignature (argSignatureNode) { +function toArgumentSignature (argSignatureNode, idx) { switch(argSignatureNode.type) { case syntax.Identifier: return { + index: idx, name: argSignatureNode.name, kind: 'mandatory' }; case syntax.ArrayExpression: return { + index: idx, name: argSignatureNode.elements[0].name, kind: 'optional' }; |