projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa40f69
)
New, woefully inadequate.
author
Mike Taylor
<mike@indexdata.com>
Tue, 22 Apr 2014 16:54:33 +0000
(17:54 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Tue, 22 Apr 2014 16:54:33 +0000
(17:54 +0100)
src/mkws-filter.js
[new file with mode: 0644]
patch
|
blob
diff --git a/src/mkws-filter.js
b/src/mkws-filter.js
new file mode 100644
(file)
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;
+}