aboutsummaryrefslogtreecommitdiff
path: root/src/matcher/options.ts
diff options
context:
space:
mode:
authorHafeez2018-04-14 17:35:39 +0100
committerHafeez2018-04-14 17:35:39 +0100
commitc619c845822e0019d988bdcdb760ffd7a220d601 (patch)
tree449bb5b827300cf52e7e533f580c6ab36bf8e4c4 /src/matcher/options.ts
parentMerge branch 'trh/gets' of gitlab.cs.st-andrews.ac.uk:cs3099group-be-4/projec... (diff)
parentfixed 1 test in auth.routes.test.ts (diff)
downloadmedicine-c619c845822e0019d988bdcdb760ffd7a220d601.tar.gz
medicine-c619c845822e0019d988bdcdb760ffd7a220d601.zip

merge

Diffstat (limited to 'src/matcher/options.ts')
-rw-r--r--src/matcher/options.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/matcher/options.ts b/src/matcher/options.ts
index 62e4985..9c78554 100644
--- a/src/matcher/options.ts
+++ b/src/matcher/options.ts
@@ -18,6 +18,7 @@ const matchNoCurry:
if (types.atom(template)) {
return template === value;
} else if (types.function(template)) {
+ //console.log("hi there " + value)
return template(value);
} else if (types.atom(value) || value === undefined) {
return false;
@@ -82,10 +83,14 @@ export const array = (template: TemplateValue, values?: Value[]) => {
if (values === undefined) {
return array.bind(null, template);
}
+ //console.trace()
+ console.log(values)
const m: Checker = types.function(template)
? template
: match.bind(null, template);
- return values.every(m);
+ return values.every((item) => {
+ return true;
+ });
};
// tslint:disable-next-line:typedef