From 65b027ca316ceefd8ea89f472561a0f91179b2f3 Mon Sep 17 00:00:00 2001 From: Thomas Wilkerling Date: Fri, 30 Jul 2021 13:27:00 +0200 Subject: [PATCH] FIX #246 --- dist/flexsearch.bundle.js | 4 ++-- dist/flexsearch.compact.js | 4 ++-- dist/flexsearch.debug.js | 4 ++-- dist/flexsearch.es5.js | 4 ++-- dist/flexsearch.light.js | 4 ++-- dist/module/lang/latin/default.js | 2 +- package.json | 2 +- src/lang/latin/default.js | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dist/flexsearch.bundle.js b/dist/flexsearch.bundle.js index dd0c083..07f54de 100644 --- a/dist/flexsearch.bundle.js +++ b/dist/flexsearch.bundle.js @@ -1,12 +1,12 @@ /**! - * FlexSearch.js v0.7.2 (Bundle) + * FlexSearch.js v0.7.21 (Bundle) * Copyright 2018-2021 Nextapps GmbH * Author: Thomas Wilkerling * Licence: Apache-2.0 * https://github.com/nextapps-de/flexsearch */ (function _f(self){'use strict';try{if(module)self=module}catch(e){}self._factory=_f;var t;function u(a){return"undefined"!==typeof a?a:!0}function aa(a){const b=Array(a);for(let c=0;c=this.B&&(w||!n[l])){var f=L(q,d,r),g="";switch(this.G){case "full":if(3f;h--)if(h-f>=this.B){var k=L(q,d,r,e,f);g=l.substring(f,h);M(this,n,g,k,a,c)}break}case "reverse":if(2=this.B&&M(this,n, diff --git a/dist/flexsearch.compact.js b/dist/flexsearch.compact.js index b1b9587..88bf939 100644 --- a/dist/flexsearch.compact.js +++ b/dist/flexsearch.compact.js @@ -1,12 +1,12 @@ /**! - * FlexSearch.js v0.7.2 (Compact) + * FlexSearch.js v0.7.21 (Compact) * Copyright 2018-2021 Nextapps GmbH * Author: Thomas Wilkerling * Licence: Apache-2.0 * https://github.com/nextapps-de/flexsearch */ (function(self){'use strict';var t;function v(a){return"undefined"!==typeof a?a:!0}function w(a){const b=Array(a);for(let c=0;c=this.m&&(u||!n[l])){var f=P(q,e,r),g="";switch(this.C){case "full":if(3f;h--)if(h-f>=this.m){var k=P(q,e,r,d,f);g=l.substring(f,h);Q(this,n,g,k,a,c)}break}case "reverse":if(2=this.m&&Q(this,n, diff --git a/dist/flexsearch.debug.js b/dist/flexsearch.debug.js index 98e6581..142aff0 100644 --- a/dist/flexsearch.debug.js +++ b/dist/flexsearch.debug.js @@ -1,5 +1,5 @@ /**! - * FlexSearch.js v0.7.2 (Debug) + * FlexSearch.js v0.7.21 (Debug) * Copyright 2018-2021 Nextapps GmbH * Author: Thomas Wilkerling * Licence: Apache-2.0 @@ -75,7 +75,7 @@ function F(a) { } ;var ha = {encode:fa, rtl:!1, tokenize:""}; function fa(a) { - return ba.call(this, a.toLowerCase(), !1, ca, !1); + return ba.call(this, ("" + a).toLowerCase(), !1, ca, !1); } ;const ia = {}, I = {}; function ja(a) { diff --git a/dist/flexsearch.es5.js b/dist/flexsearch.es5.js index e0d1163..0cb5290 100644 --- a/dist/flexsearch.es5.js +++ b/dist/flexsearch.es5.js @@ -1,5 +1,5 @@ /**! - * FlexSearch.js v0.7.2 (ES5) + * FlexSearch.js v0.7.21 (ES5) * Copyright 2018-2021 Nextapps GmbH * Author: Thomas Wilkerling * Licence: Apache-2.0 @@ -17,7 +17,7 @@ function(){if(this.M)return!1;var e=w.CustomEvent,h=w.Event,k=w.dispatchEvent;if function(e){var h=this.o();e.J(h.resolve,h.reject)};b.prototype.V=function(e,h){var k=this.o();try{e.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(e,h){function k(m,q){return"function"==typeof m?function(r){try{l(m(r))}catch(u){p(u)}}:q}var l,p,n=new b(function(m,q){l=m;p=q});this.J(k(e,l),k(h,p));return n};b.prototype.catch=function(e){return this.then(void 0,e)};b.prototype.J=function(e,h){function k(){switch(l.l){case 1:e(l.m);break;case 2:h(l.m);break;default:throw Error("Unexpected state: "+ l.l);}}var l=this;null==this.h?g.l(k):this.h.push(k);this.M=!0};b.resolve=d;b.reject=function(e){return new b(function(h,k){k(e)})};b.race=function(e){return new b(function(h,k){for(var l=ea(e),p=l.next();!p.done;p=l.next())d(p.value).J(h,k)})};b.all=function(e){var h=ea(e),k=h.next();return k.done?d([]):new b(function(l,p){function n(r){return function(u){m[r]=u;q--;0==q&&l(m)}}var m=[],q=0;do m.push(void 0),q++,d(k.value).J(n(m.length-1),p),k=h.next();while(!k.done)})};return b}); var fa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c=this.C&&(e||!g[l])){var n=P(h,d,k),m="";switch(this.H){case "full":if(3n;q--)if(q-n>=this.C){var r=P(h,d,k,p,n);m=l.substring(n,q);Q(this,g,m,r,a,c)}break}case "reverse":if(2=this.C&&Q(this,g,m,P(h,d,k, diff --git a/dist/flexsearch.light.js b/dist/flexsearch.light.js index f84bf50..c8d2d2c 100644 --- a/dist/flexsearch.light.js +++ b/dist/flexsearch.light.js @@ -1,11 +1,11 @@ /**! - * FlexSearch.js v0.7.2 (Light) + * FlexSearch.js v0.7.21 (Light) * Copyright 2018-2021 Nextapps GmbH * Author: Thomas Wilkerling * Licence: Apache-2.0 * https://github.com/nextapps-de/flexsearch */ -(function(self){'use strict';function t(a){return"undefined"!==typeof a?a:!0}function v(a){const c=Array(a);for(let b=0;b=this.h&&(r||!m[k])){var h=J(p,d,q),f="";switch(this.C){case "full":if(3h;g--)if(g-h>=this.h){var l=J(p,d,q,e,h);f=k.substring(h,g);K(this,m,f,l,a,b)}break}case "reverse":if(2=this.h&&K(this, diff --git a/dist/module/lang/latin/default.js b/dist/module/lang/latin/default.js index 4ee8870..3ab62d7 100644 --- a/dist/module/lang/latin/default.js +++ b/dist/module/lang/latin/default.js @@ -1 +1 @@ -import{IndexInterface}from"../../type.js";import{pipeline,normalize,regex_whitespace}from"../../lang.js";export const rtl=!1;export const tokenize="";export default{encode:encode,rtl:!1,tokenize:""};export function encode(a){return pipeline.call(this,a.toLowerCase(),!1,regex_whitespace,!1)} \ No newline at end of file +import{IndexInterface}from"../../type.js";import{pipeline,normalize,regex_whitespace}from"../../lang.js";export const rtl=!1;export const tokenize="";export default{encode:encode,rtl:!1,tokenize:""};export function encode(a){return pipeline.call(this,(""+a).toLowerCase(),!1,regex_whitespace,!1)} \ No newline at end of file diff --git a/package.json b/package.json index f6a0cf4..dbbfeb6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flexsearch", - "version": "0.7.2", + "version": "0.7.21", "description": "Next-Generation full text search library with zero dependencies.", "homepage": "https://github.com/nextapps-de/flexsearch/", "author": "Thomas Wilkerling", diff --git a/src/lang/latin/default.js b/src/lang/latin/default.js index 5094999..8c5ce89 100644 --- a/src/lang/latin/default.js +++ b/src/lang/latin/default.js @@ -18,7 +18,7 @@ export function encode(str){ return pipeline.call( this, - /* string: */ str.toLowerCase(), + /* string: */ ("" + str).toLowerCase(), /* normalize: */ false, /* split: */ regex_whitespace, /* collapse: */ false