From: Mike Taylor Date: Wed, 23 Apr 2014 16:44:20 +0000 (+0100) Subject: New implementation of pp2limit method based on visitFields. X-Git-Tag: 1.0.0~863 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=f002d9cfb2ad66e632f7aba0ab5b7339e1ce33b1;p=mkws-moved-to-github.git New implementation of pp2limit method based on visitFields. --- diff --git a/src/mkws-filter.js b/src/mkws-filter.js index 4d600cc..03e07e1 100644 --- a/src/mkws-filter.js +++ b/src/mkws-filter.js @@ -95,7 +95,13 @@ function filterSet(team) { }; that.NEW_pp2limit = function(initial) { - return that.OLD_pp2limit(initial); + var res = initial || ""; + + that.visitFields(function(field, value) { + if (res) res += ","; + res += field + "=" + value.replace(/[\\|,]/g, '\\$&'); + }); + return res; } return that;