From: Mike Taylor Date: Tue, 22 Apr 2014 16:54:33 +0000 (+0100) Subject: New, woefully inadequate. X-Git-Tag: 1.0.0~897 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=d17b8d85a517f52832afbcce1a52b83ba7152498;p=mkws-moved-to-github.git New, woefully inadequate. --- 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; +}