From d17b8d85a517f52832afbcce1a52b83ba7152498 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 22 Apr 2014 17:54:33 +0100 Subject: [PATCH] New, woefully inadequate. --- src/mkws-filter.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/mkws-filter.js diff --git a/src/mkws-filter.js b/src/mkws-filter.js new file mode 100644 index 0000000..c62235e --- /dev/null +++ b/src/mkws-filter.js @@ -0,0 +1,12 @@ +// Factory function for filters. These can be of several types. +function filter(id, field, value) { + var res; + + if (id) { + res = { id: id, name: name }; + } else { + res = { field: field, value: value }; + } + + return res; +} -- 1.7.10.4