flexsearch
Advanced tools
Comparing version 0.2.62 to 0.2.63
var child_process = require('child_process'); | ||
var fs = require('fs'); | ||
@@ -11,2 +12,4 @@ var supported_lang = [ | ||
fs.existsSync("log") || fs.mkdirSync("log"); | ||
var options = (function(argv){ | ||
@@ -13,0 +16,0 @@ |
/* | ||
FlexSearch v0.2.49 | ||
FlexSearch v0.2.63 | ||
Copyright 2018 Thomas Wilkerling | ||
@@ -14,3 +14,3 @@ Released under the Apache 2.0 Licence | ||
b.search(c.content,c.threshold?{limit:c.limit,threshold:c.threshold}:c.limit);self.postMessage({id:a,content:c.content,limit:c.limit,result:e})}else c.add?b.add(c.id,c.content):c.update?b.update(c.id,c.content):c.remove?b.remove(c.id):c.reset?b.reset():c.info?(c=b.info(),c.worker=a,b.debug&&console.log(c)):c.register&&(a=c.id,c.options.cache=!1,c.options.async=!0,c.options.worker=!1,b=(new Function(c.register.substring(c.register.indexOf("{")+1,c.register.lastIndexOf("}"))))(),b=new b(c.options))}}, | ||
function(a){(a=a.data)&&a.result?c(a.id,a.content,a.result,a.limit):e.debug&&console.log(a)},b);var d=N.toString();e.id=b;a.postMessage(b,{register:d,options:e,id:b});return a}var x={encode:"icase",mode:"ngram",v:!1,cache:!1,async:!1,c:!1,threshold:0,depth:0},G={memory:{encode:"extra",mode:"strict",threshold:7},speed:{encode:"icase",mode:"strict",threshold:7,depth:2},match:{encode:"extra",mode:"full"},score:{encode:"extra",mode:"strict",threshold:5,depth:4},balance:{encode:"balance",mode:"ngram", | ||
function(a){(a=a.data)&&a.result?c(a.id,a.content,a.result,a.limit):e.debug&&console.log(a)},b);var d=N.toString();e.id=b;a.postMessage(b,{register:d,options:e,id:b});return a}var x={encode:"icase",mode:"forward",v:!1,cache:!1,async:!1,c:!1,threshold:0,depth:0},G={memory:{encode:"extra",mode:"strict",threshold:7},speed:{encode:"icase",mode:"strict",threshold:7,depth:2},match:{encode:"extra",mode:"full"},score:{encode:"extra",mode:"strict",threshold:5,depth:4},balance:{encode:"balance",mode:"ngram", | ||
threshold:6,depth:3},fastest:{encode:"icase",mode:"strict",threshold:9,depth:1}},B=[],O=0,D={add:0,update:1,remove:2},K=d("[ -/]"),L={},M={};f.new=function(a){return new this(a)};f.create=function(a){return f.new(a)};f.registerMatcher=function(a){for(var b in a)a.hasOwnProperty(b)&&(B[B.length]=d(b),B[B.length]=a[b]);return this};f.registerEncoder=function(a,b){A[a]=b;return this};f.registerLanguage=function(a,b){L[a]=b.filter;M[a]=b.stemmer;return this};f.encode=function(a,b){return A[a].call(A, | ||
@@ -17,0 +17,0 @@ b)};f.prototype.init=function(a){this.A=[];a||(a=x);var b=a.profile,e=b?G[b]:{};if(b=a.worker)if("undefined"===typeof Worker)a.worker=!1,a.async=!0,this.h=null;else{var c=this;b=parseInt(b,10)||4;c.m=-1;c.s=0;c.g=[];c.w=null;c.h=Array(b);for(var d=0;d<b;d++)c.h[d]=U(c.id,d,a||x,function(a,b,e,d){c.s!==c.c&&(c.g=c.g.concat(e),c.s++,d&&c.g.length>=d&&(c.s=c.c),c.w&&c.s===c.c&&(c.cache&&c.i.set(b,c.g),c.w(c.g),c.g=[]))})}this.mode=a.mode||e.mode||this.mode||x.mode;this.async=a.async||this.async||x.async; |
{ | ||
"name": "flexsearch", | ||
"version": "0.2.62", | ||
"version": "0.2.63", | ||
"description": "Next-Generation full text search library with zero dependencies.", | ||
@@ -55,3 +55,3 @@ "homepage": "https://github.com/nextapps-de/flexsearch/", | ||
"google-closure-compiler": "^20180402.0.0", | ||
"mocha": "^5.0.4", | ||
"mocha": "^5.0.5", | ||
"mocha-lcov-reporter": "^1.3.0", | ||
@@ -58,0 +58,0 @@ "mocha-phantomjs": "^4.1.0", |
@@ -0,0 +0,0 @@ <p align="center"> |
@@ -174,3 +174,3 @@ if(typeof module !== 'undefined'){ | ||
expect(flexsearch_default.async).to.equal(false); | ||
expect(flexsearch_default.mode).to.equal("ngram"); | ||
expect(flexsearch_default.mode).to.equal("forward"); | ||
expect(flexsearch_sync.async).to.equal(false); | ||
@@ -177,0 +177,0 @@ expect(flexsearch_async.async).to.equal(true); |
Sorry, the diff of this file is too big to display
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1936117
3241
2