From 779905f262c7c138ba216b7f0c380266476e65f5 Mon Sep 17 00:00:00 2001 From: Thomas Wilkerling Date: Thu, 24 Jan 2019 14:03:07 +0100 Subject: [PATCH] ADD v0.2.70 --- compile.js | 3 +- flexsearch.js | 349 +++++++++++++++++++++----------------------- flexsearch.light.js | 23 ++- flexsearch.min.js | 50 +++---- package.json | 6 +- 5 files changed, 208 insertions(+), 223 deletions(-) diff --git a/compile.js b/compile.js index d3862fe..ddb3047 100644 --- a/compile.js +++ b/compile.js @@ -48,8 +48,6 @@ var parameter = (function(opt){ } } - //console.log(parameter); - return parameter; })({ @@ -57,6 +55,7 @@ var parameter = (function(opt){ use_types_for_optimization: true, new_type_inf: true, jscomp_warning: "newCheckTypes", + //jscomp_error: "strictCheckTypes", generate_exports: true, export_local_property_definitions: true, language_in: "ECMASCRIPT5_STRICT", diff --git a/flexsearch.js b/flexsearch.js index 54f6456..22fb8bf 100644 --- a/flexsearch.js +++ b/flexsearch.js @@ -1,5 +1,5 @@ ;/**! - * @preserve FlexSearch v0.2.68 + * @preserve FlexSearch v0.2.70 * Copyright 2018 Thomas Wilkerling * Released under the Apache 2.0 Licence * https://github.com/nextapps-de/flexsearch @@ -290,162 +290,159 @@ var SUPPORT_ASYNC = true; /** @type {Array} */ this._matcher = []; - //if(options){ + options || (options = defaults); - options || (options = defaults); + var custom = /** @type {?string} */ (options["profile"]); + var profile = custom && !indexBlacklist[custom] ? profiles[custom] : createObject(); - var custom = options["profile"]; - var profile = custom && !indexBlacklist[/** @type {string} */ (custom)] ? profiles[custom] : createObject(); + // initialize worker - // initialize worker + if(SUPPORT_WORKER && (custom = options["worker"])){ - if(SUPPORT_WORKER && (custom = options["worker"])){ + if(Worker){ - if(typeof Worker === "undefined"){ + var self = this; + var threads = parseInt(custom, 10) || 4; - options["worker"] = false; + self._currentTask = -1; + self._taskCompleted = 0; + self._taskResult = []; + self._currentCallback = null; + //self._ids_count = new Array(threads); + self._worker = new Array(threads); - // if(SUPPORT_ASYNC){ - // - // options["async"] = true; - // } + for(var i = 0; i < threads; i++){ - this._worker = null; - } - else{ + //self._ids_count[i] = 0; - var self = this; - var threads = parseInt(custom, 10) || 4; + self._worker[i] = addWorker(self.id, i, options /*|| defaults*/, function(id, query, result, limit){ - self._currentTask = -1; - self._taskCompleted = 0; - self._taskResult = []; - self._currentCallback = null; - //self._ids_count = new Array(threads); - self._worker = new Array(threads); + if(self._taskCompleted === self.worker){ - for(var i = 0; i < threads; i++){ + return; + } - //self._ids_count[i] = 0; + self._taskResult = self._taskResult.concat(result); + self._taskCompleted++; - self._worker[i] = addWorker(self.id, i, options /*|| defaults*/, function(id, query, result, limit){ + if(limit && (self._taskResult.length >= limit)){ - if(self._taskCompleted === self.worker){ + self._taskCompleted = self.worker; + } - return; + if(self._currentCallback && (self._taskCompleted === self.worker)){ + + // store result to cache + // TODO: add worker cache, may remove global cache + + if(self.cache){ + + self._cache.set(query, self._taskResult); } - self._taskResult = self._taskResult.concat(result); - self._taskCompleted++; + self._currentCallback(self._taskResult); + self._taskResult = []; + } - if(limit && (self._taskResult.length >= limit)){ - - self._taskCompleted = self.worker; - } - - if(self._currentCallback && (self._taskCompleted === self.worker)){ - - // store result to cache - // TODO: add worker cache, may remove global cache - - if(self.cache){ - - self._cache.set(query, self._taskResult); - } - - self._currentCallback(self._taskResult); - self._taskResult = []; - } - - return self; - }); - } + return self; + }); } } + else{ - // apply custom options + options["worker"] = false; - this.mode = ( + // if(SUPPORT_ASYNC){ + // + // options["async"] = true; + // } - options["mode"] || - profile.mode || - this.mode || - defaults.mode - ); - - if(SUPPORT_ASYNC) this.async = ( - - options["async"] || - this.async || - defaults.async - ); - - if(SUPPORT_WORKER) this.worker = ( - - options["worker"] || - this.worker || - defaults.worker - ); - - this.threshold = ( - - options["threshold"] || - profile.threshold || - this.threshold || - defaults.threshold - ); - - this.depth = ( - - options["depth"] || - profile.depth || - this.depth || - defaults.depth - ); - - this.suggest = ( - - options["suggest"] || - this.suggest || - defaults.suggest - ); - - custom = options["encode"] || profile.encode; - - this.encoder = ( - - (custom && !indexBlacklist[custom] && globalEncoder[custom]) || - (typeof custom === "function" ? custom : this.encoder || false) - ); - - if(SUPPORT_DEBUG){ - - this.debug = ( - - options["debug"] || - this.debug - ); + this._worker = null; } + } - if(custom = options["matcher"]) { + // apply custom options - this.addMatcher( + this.mode = ( - /** @type {Object} */ - (custom) - ); - } + options["mode"] || + profile.mode || + this.mode || + defaults.mode + ); - if((custom = options["filter"]) && !indexBlacklist[/** @type {string} */ (custom)]) { + if(SUPPORT_ASYNC) this.async = ( - this.filter = initFilter(filter[custom] || custom, this.encoder); - } + options["async"] || + this.async || + defaults.async + ); - if((custom = options["stemmer"]) && !indexBlacklist[/** @type {string} */ (custom)]) { + if(SUPPORT_WORKER) this.worker = ( - this.stemmer = initStemmer(stemmer[custom] || custom, this.encoder); - } - //} + options["worker"] || + this.worker || + defaults.worker + ); + + this.threshold = ( + + options["threshold"] || + profile.threshold || + this.threshold || + defaults.threshold + ); + + this.depth = ( + + options["depth"] || + profile.depth || + this.depth || + defaults.depth + ); + + this.suggest = ( + + options["suggest"] || + this.suggest || + defaults.suggest + ); + + custom = options["encode"] || profile.encode; + + this.encoder = ( + + (custom && !indexBlacklist[custom] && globalEncoder[custom]) || + (typeof custom === "function" ? custom : this.encoder || false) + ); + + if(SUPPORT_DEBUG){ + + this.debug = ( + + options["debug"] || + this.debug + ); + } + + if(custom = options["matcher"]) { + + this.addMatcher( + + /** @type {Object} */ + (custom) + ); + } + + if((custom = options["filter"]) /*&& !indexBlacklist[custom]*/) { + + this.filter = initFilter(filter[custom] || custom, this.encoder); + } + + if((custom = options["stemmer"]) /*&& !indexBlacklist[custom]*/) { + + this.stemmer = initStemmer(stemmer[custom] || custom, this.encoder); + } // initialize primary index @@ -902,7 +899,7 @@ var SUPPORT_ASYNC = true; var threshold; var result = []; - if(query && (typeof query === "object")){ + if(typeof query === "object"){ // re-assign properties @@ -912,16 +909,16 @@ var SUPPORT_ASYNC = true; query = query["query"]; } - threshold = (threshold || this.threshold || 0) | 0; + threshold || (threshold = this.threshold || 0); if(typeof limit === "function"){ callback = limit; limit = 1000; } - else{ + else { - limit || (limit = 1000); + limit || (limit === 0 ) || (limit = 1000); } if(SUPPORT_WORKER && this.worker){ @@ -1066,11 +1063,11 @@ var SUPPORT_ASYNC = true; : this._map - )[z][value]; + )[z]; - if(map){ + if(map[value]){ - mapCheck[count++] = map; + mapCheck[count++] = map[value]; mapFound = true; } } @@ -1675,14 +1672,13 @@ var SUPPORT_ASYNC = true; function addIndex(map, dupes, tmp, id, partialScore, contextScore, threshold){ - if(typeof dupes[tmp] === "undefined"){ + if(!dupes[tmp]){ var score = ( partialScore ? ((9 - (threshold || 6)) * contextScore) + ((threshold || 6) * partialScore) - // calcScore(tmp, content) : contextScore ); @@ -1696,30 +1692,15 @@ var SUPPORT_ASYNC = true; arr[arr.length] = id; } + + return score; } + else{ - return score || dupes[tmp]; + return dupes[tmp]; + } } - /** - * @param {!string} part - * @param {!string} ref - * @returns {number} - */ - - /* - function calcScore(part, ref){ - - var contextIndex = ref.indexOf(part); - var partial_index = contextIndex - ref.lastIndexOf(" ", contextIndex); - - return ( - - (3 / ref.length * (ref.length - contextIndex)) + (6 / partial_index) - ); - } - */ - /** * @param {Object} map * @param {string|number} id @@ -2082,32 +2063,47 @@ var SUPPORT_ASYNC = true; while(i < length){ - var checkVal = check[tmp = arr[++i]]; + tmp = arr[++i]; - if(checkVal === z){ + if(check[tmp]){ - // fill in during last round + var checkVal = check[tmp]; - if(isFinalLoop){ + if(checkVal === z){ - result[count++] = tmp; + // fill in during last round - if(limit && (count === limit)){ + if(isFinalLoop){ - return result; + result[count++] = tmp; + + if(limit && (count === limit)){ + + return result; + } } + else{ + + check[tmp] = z + 1; + } + + // apply count status + + found = true; } + else if(suggest){ - // apply count status + var currentSuggestion = ( - found = true; - check[tmp] = z + 1; - } - else if(suggest){ + suggestions[checkVal] ? - var currentSuggestion = suggestions[checkVal] || (suggestions[checkVal] = []); + suggestions[checkVal] + : + suggestions[checkVal] = [] + ); - currentSuggestion[currentSuggestion.length] = tmp; + currentSuggestion[currentSuggestion.length] = tmp; + } } } @@ -2121,11 +2117,10 @@ var SUPPORT_ASYNC = true; if(suggest){ - limit || (limit = 1000); count = result.length; length = suggestions.length; - if((count < limit) && length){ + if(length && (!limit || (count < limit))){ for(z = length - 1; z >= 0; z--){ @@ -2424,14 +2419,6 @@ var SUPPORT_ASYNC = true; ); } - /** - * @type {Function} - * @const - * @final - */ - - //var emptyObject = new Function("var o={};o.__proto__=null;return o;"); - /** * https://jsperf.com/comparison-object-index-type * @param {number=} count @@ -2446,14 +2433,14 @@ var SUPPORT_ASYNC = true; for(var i = 0; i < count; i++){ - array[i] = createObject(); + array[i] = Object.create(null); } return array; } else{ - return Object.create(null); //emptyObject(); + return Object.create(null); } } diff --git a/flexsearch.light.js b/flexsearch.light.js index 2737d3d..63e10cd 100644 --- a/flexsearch.light.js +++ b/flexsearch.light.js @@ -1,20 +1,19 @@ /* - FlexSearch v0.2.68 + FlexSearch v0.2.70 Copyright 2018 Thomas Wilkerling Released under the Apache 2.0 Licence https://github.com/nextapps-de/flexsearch */ 'use strict';(function(d,x,p){var t;(t=p.define)&&t.amd?t([],function(){return x}):(t=p.modules)?t[d.toLowerCase()]=x:"undefined"!==typeof module?module.exports=x:p[d]=x})("FlexSearch",function(){function d(a){"string"!==typeof a||v[a]||(a=D[a]);a||(a=y);this.id=a.id||I++;this.init(a);x(this,"index",function(){return this.a});x(this,"length",function(){return Object.keys(this.a).length})}function x(a,b,c){Object.defineProperty(a,b,{get:c})}function p(a){return new RegExp(a,"g")}function t(a,b,c){if("undefined"=== -typeof c){for(c=0;c=f&&(a=a[g+.5|0],a=a[c]||(a[c]=[]),a[a.length]=e)}return g||b[c]}function B(a,b){if(a)for(var c=Object.keys(a),e=0,m=c.length;e=(8=(8a?1:0a?-1:0b&&(e=e.slice(0,b)));return e}function u(a){if(a){for(var b=Array(a),c=0;c=g&&(a=a[f+.5|0],a=a[c]||(a[c]=[]),a[a.length]=e);return f}function B(a,b){if(a)for(var c=Object.keys(a),e=0,f=c.length;e=(8=(8a?1:0a?-1:0b&&(e=e.slice(0,b)));return e}function u(a){if(a){for(var b=Array(a),c=0;cl;r--)n=d.substring(l,r),A(f,e,n,a,t,p,m);break;default:if(l=A(f,e,d,a,1,p,m),k&&1=m)for(q=e._ctx[d]||(e._ctx[d]=u()),d=this.b[d]||(this.b[d]=u(10)),l=h-k,r=h+k+1,0>l&&(l=0),r>g&&(r=g);lb;b++)B(this.g[b],a);this.depth&&B(this.b,a);delete this.a[a]}return this};d.prototype.search=function(a,b,c){var e=[];if(a&&"object"===typeof a){c=a.callback||b;b=a.limit;var m=a.threshold;a=a.query}m=(m||this.threshold||0)|0;"function"===typeof b?(c=b,b=1E3):b||(b=1E3);if(c){var d=this;M(function(){c(d.search(a,b));d=null},1,"search-"+this.id);return null}if(!a||"string"!==typeof a)return e;var f=this.encode(a);if(!f.length)return e;var g=this.mode;f="function"===typeof g?g(f):"ngram"===g? -E(f):f.split(F);g=f.length;var h=!0,p=[],q=u();if(1=m;B--)if(w=(t?l[n]:this.g)[B][r])y[A++]=w,x=!0;if(x)p[p.length]=1k;r--)n=d.substring(k,r),A(g,e,n,a,t,p,f);break;default:if(k=A(g,e,d,a,1,p,f),q&&1=f)for(m=e._ctx[d]||(e._ctx[d]=u()),d=this.b[d]||(this.b[d]=u(10)),k=h-q,r=h+q+1,0>k&&(k=0),r>l&&(r=l);kb;b++)B(this.g[b],a);this.depth&&B(this.b,a); +delete this.a[a]}return this};d.prototype.search=function(a,b,c){var e=[];if("object"===typeof a){c=a.callback||b;b=a.limit;var f=a.threshold;a=a.query}f||(f=this.threshold||0);"function"===typeof b?(c=b,b=1E3):b||0===b||(b=1E3);if(c){var d=this;M(function(){c(d.search(a,b));d=null},1,"search-"+this.id);return null}if(!a||"string"!==typeof a)return e;var g=this.encode(a);if(!g.length)return e;var l=this.mode;g="function"===typeof l?l(g):"ngram"===l?E(g):g.split(F);l=g.length;var h=!0,p=[],m=u();if(1< +l)if(this.depth){var t=!0,n=g[0];m[n]="1"}else g.sort(J);var k;if(!t||(k=this.b)[n])for(var v=t?1:0;v=f;B--)w=(t?k[n]:this.g)[B],w[r]&&(y[A++]=w[r],x=!0);if(x)p[p.length]=1=g&&(a=a[h+.5|0],a=a[e]||(a[e]=[]),a[a.length]=c)}return h||b[e]}function m(a,b){if(a)for(var e=Object.keys(a),c=0,l=e.length;c=(8=(8a?1:0a?-1:0b&&(c=c.slice(0,b)));return c} -function H(a){a.C||(a.C=K(function(){a.C=null;var b=a.async;b&&(a.async=!1);if(a.c.length){for(var e=L(),c;(c=a.c.shift())||0===c;){var d=a.f[c];switch(d[0]){case E.add:a.add(d[1],d[2]);break;case E.remove:a.remove(d[1])}delete a.f[c];if(100=d&&(c.o=c.b),c.A&&c.o===c.b&&(c.cache&&c.i.set(b,c.g),c.A(c.g),c.g=[]),c})}this.mode=a.mode||e.mode||this.mode||y.mode;this.async=a.async||this.async||y.async;this.b=a.worker||this.b||y.b;this.threshold=a.threshold||e.threshold||this.threshold||y.threshold;this.depth=a.depth||e.depth||this.depth||y.depth;this.u=a.suggest||this.u||y.u;this.s=(b=a.encode||e.encode)&&!x[b]&&C[b]||("function"===typeof b?b:this.s||!1);this.debug=a.debug||this.debug;(b=a.matcher)&&this.addMatcher(b);(b=a.filter)&& -!x[b]&&(this.filter=R(N[b]||b,this.s));(b=a.stemmer)&&!x[b]&&(this.stemmer=S(O[b]||b,this.s));this.j=r(10);this.l=r();this.a=r();this.f=r();this.c=[];this.C=null;this.v=!0;this.i=(this.cache=b=a.cache||this.cache||y.cache)?new X(b):!1;return this};f.prototype.encode=function(a){a&&F.length&&(a=A(a,F));a&&this.B.length&&(a=A(a,this.B));a&&this.s&&(a=this.s.call(C,a));a&&this.stemmer&&(a=A(a,this.stemmer));return a};f.prototype.addMatcher=function(a){var b=this.B,e;for(e in a)a.hasOwnProperty(e)&&b.push(d(e), -a[e]);return this};f.prototype.add=function(a,b,e){if("string"===typeof b&&b&&(a&&!x[a]||0===a))if(this.a[a]&&!e)this.update(a,b);else{if(this.b)return++this.m>=this.h.length&&(this.m=0),this.h[this.m].postMessage(this.m,{add:!0,id:a,content:b}),this.a[a]=""+this.m,this;if(this.async)return this.f[a]||(this.c[this.c.length]=a),this.f[a]=[E.add,a,b],H(this),this;b=this.encode(b);if(!b.length)return this;e=this.mode;b="function"===typeof e?e(b):"ngram"===e?J(b):b.split(M);var c=r();c._ctx=r();for(var d= -this.threshold,f=this.depth,g=this.j,h=b.length,m=0;mk;t--)p=n.substring(k,t),z(g,c,p,a,u,v,d);break;default:if(k=z(g,c,n,a,1,v,d),f&&1=d)for(q=c._ctx[n]||(c._ctx[n]=r()),n=this.l[n]||(this.l[n]=r(10)),k=m-f,t=m+f+1,0>k&&(k=0),t> -h&&(t=h);kb;b++)m(this.j[b],a); -this.depth&&m(this.l,a);delete this.a[a];this.v=!1}return this};f.prototype.search=function(a,b,e){var c=[];if(a&&"object"===typeof a){e=a.callback||b;b=a.limit;var d=a.threshold;a=a.query}d=(d||this.threshold||0)|0;"function"===typeof b?(e=b,b=1E3):b||(b=1E3);if(this.b){this.A=e;this.o=0;this.g=[];for(c=0;c=d;z--)if(w=(v?k[p]:this.j)[z][t])y[A++]=w,x=!0;if(x)n[n.length]=1g;g++)for(b=Object.keys(this.j[g]),a=0;af;c--)h=g[c-1],g[c]=h,d[h]=c;g[f]=a;d[a]=f}}}return b};return a}();return f}(function(){var u=Object.create(null),D=!("undefined"===typeof Blob||"undefined"===typeof URL||!URL.createObjectURL);return function(f,w,d,A,z){var m=f;f=D?URL.createObjectURL(new Blob(["var SUPPORT_WORKER = true;var SUPPORT_BUILTINS = true;var SUPPORT_DEBUG = true;var SUPPORT_CACHE = true;var SUPPORT_ASYNC = true;("+ -d.toString()+")()"],{type:"text/javascript"})):"../"+m+".js";m+="-"+w;u[m]||(u[m]=[]);u[m][z]=new Worker(f);u[m][z].onmessage=A;console.log("Register Worker: "+m+"@"+z);return{postMessage:function(d,f){u[m][d].postMessage(f)}}}}()),this); +'use strict';(function(v,D,f){var w;(w=f.define)&&w.amd?w([],function(){return D}):(w=f.modules)?w[v.toLowerCase()]=D:"undefined"!==typeof module?module.exports=D:f[v]=D})("FlexSearch",function P(v){function f(a){"string"!==typeof a||y[a]||(a=I[a]);a||(a=z);this.id=a.id||Q++;this.init(a);w(this,"index",function(){return this.a});w(this,"length",function(){return Object.keys(this.a).length})}function w(a,b,d){Object.defineProperty(a,b,{get:d})}function e(a){return new RegExp(a,"g")}function x(a,b, +d){if("undefined"===typeof d){for(d=0;d=h&&(a=a[g+.5|0],a=a[d]||(a[d]=[]),a[a.length]=c);return g}function r(a,b){if(a)for(var d=Object.keys(a),c=0,g=d.length;c=(8=(8a?1:0a?-1:0b&&(c=c.slice(0,b)));return c}function H(a){a.C|| +(a.C=K(function(){a.C=null;var b=a.async;b&&(a.async=!1);if(a.c.length){for(var d=L(),c;(c=a.c.shift())||0===c;){var g=a.f[c];switch(g[0]){case E.add:a.add(g[1],g[2]);break;case E.remove:a.remove(g[1])}delete a.f[c];if(100=g&&(c.o=c.b),c.A&&c.o===c.b&&(c.cache&& +c.i.set(b,c.g),c.A(c.g),c.g=[]),c})}else a.worker=!1,this.h=null;this.mode=a.mode||d.mode||this.mode||z.mode;this.async=a.async||this.async||z.async;this.b=a.worker||this.b||z.b;this.threshold=a.threshold||d.threshold||this.threshold||z.threshold;this.depth=a.depth||d.depth||this.depth||z.depth;this.u=a.suggest||this.u||z.u;this.s=(b=a.encode||d.encode)&&!y[b]&&C[b]||("function"===typeof b?b:this.s||!1);this.debug=a.debug||this.debug;(b=a.matcher)&&this.addMatcher(b);if(b=a.filter)this.filter=R(N[b]|| +b,this.s);if(b=a.stemmer)this.stemmer=S(O[b]||b,this.s);this.j=t(10);this.l=t();this.a=t();this.f=t();this.c=[];this.C=null;this.v=!0;this.i=(this.cache=b=a.cache||this.cache||z.cache)?new X(b):!1;return this};f.prototype.encode=function(a){a&&F.length&&(a=x(a,F));a&&this.B.length&&(a=x(a,this.B));a&&this.s&&(a=this.s.call(C,a));a&&this.stemmer&&(a=x(a,this.stemmer));return a};f.prototype.addMatcher=function(a){var b=this.B,d;for(d in a)a.hasOwnProperty(d)&&b.push(e(d),a[d]);return this};f.prototype.add= +function(a,b,d){if("string"===typeof b&&b&&(a&&!y[a]||0===a))if(this.a[a]&&!d)this.update(a,b);else{if(this.b)return++this.m>=this.h.length&&(this.m=0),this.h[this.m].postMessage(this.m,{add:!0,id:a,content:b}),this.a[a]=""+this.m,this;if(this.async)return this.f[a]||(this.c[this.c.length]=a),this.f[a]=[E.add,a,b],H(this),this;b=this.encode(b);if(!b.length)return this;d=this.mode;b="function"===typeof d?d(b):"ngram"===d?J(b):b.split(M);var c=t();c._ctx=t();for(var g=this.threshold,e=this.depth,h= +this.j,l=b.length,f=0;fk;q--)p=m.substring(k,q),A(h,c,p,a,r,u,g);break;default:if(k=A(h,c,m,a,1,u,g),e&&1=g)for(n=c._ctx[m]||(c._ctx[m]=t()),m=this.l[m]||(this.l[m]=t(10)),k=f-e,q=f+e+1,0>k&&(k=0),q>l&&(q=l);kb;b++)r(this.j[b],a);this.depth&&r(this.l,a);delete this.a[a]; +this.v=!1}return this};f.prototype.search=function(a,b,d){var c=[];if("object"===typeof a){d=a.callback||b;b=a.limit;var g=a.threshold;a=a.query}g||(g=this.threshold||0);"function"===typeof b?(d=b,b=1E3):b||0===b||(b=1E3);if(this.b){this.A=d;this.o=0;this.g=[];for(c=0;c=g;y--)w=(u?k[p]:this.j)[y],w[q]&&(x[A++]=w[q],z=!0);if(z)m[m.length]=1h;h++)for(b=Object.keys(this.j[h]),a=0;af;c--)l=h[c-1],h[c]=l,e[l]=c;h[f]=a;e[a]=f}}}return b};return a}();return f}(function(){var v=Object.create(null),D=!("undefined"===typeof Blob||"undefined"===typeof URL||!URL.createObjectURL);return function(f,w,e,x,A){var r=f;f=D?URL.createObjectURL(new Blob(["var SUPPORT_WORKER = true;var SUPPORT_BUILTINS = true;var SUPPORT_DEBUG = true;var SUPPORT_CACHE = true;var SUPPORT_ASYNC = true;("+ +e.toString()+")()"],{type:"text/javascript"})):"../"+r+".js";r+="-"+w;v[r]||(v[r]=[]);v[r][A]=new Worker(f);v[r][A].onmessage=x;console.log("Register Worker: "+r+"@"+A);return{postMessage:function(e,f){v[r][e].postMessage(f)}}}}()),this); diff --git a/package.json b/package.json index 869ea9d..7e31ae0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flexsearch", - "version": "0.2.69", + "version": "0.2.70", "description": "Next-Generation full text search library with zero dependencies.", "homepage": "https://github.com/nextapps-de/flexsearch/", "author": "Thomas Wilkerling", @@ -52,11 +52,11 @@ "chai": "^4.1.2", "codacy-coverage": "^3.0.0", "coveralls": "^3.0.1", - "google-closure-compiler": "^20180716.0.0", + "google-closure-compiler": "^20190124.0.0-nightly", "mocha": "^5.1.1", "mocha-lcov-reporter": "^1.3.0", "mocha-phantomjs": "^4.1.0", - "nyc": "^12.0.1", + "nyc": "^13.1.0", "phantomjs-prebuilt": "^2.1.16", "updtr": "^2.0.0" }