Skip to content

Commit 03fe14f

Browse files
committed
Rebuild. Bump.
1 parent adaa855 commit 03fe14f

File tree

8 files changed

+35
-27
lines changed

8 files changed

+35
-27
lines changed

dist/thinker.cjs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,6 @@
517517
return exported;
518518
}
519519

520-
var stemmer_1 = stemmer;
521-
522520
// Standard suffix manipulations.
523521
var step2list = {
524522
ational: 'ate',
@@ -583,10 +581,16 @@
583581
var step3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
584582
var step4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
585583

586-
// Stem `value`.
587-
// eslint-disable-next-line complexity
584+
/**
585+
* Stem `value`.
586+
*
587+
* @param {string} value
588+
* @returns {string}
589+
*/
588590
function stemmer(value) {
591+
/** @type {boolean} */
589592
var firstCharacterWasLowerCaseY;
593+
/** @type {RegExpMatchArray} */
590594
var match;
591595

592596
value = String(value).toLowerCase();
@@ -607,17 +611,17 @@
607611
// Step 1a.
608612
if (sfxSsesOrIes.test(value)) {
609613
// Remove last two characters.
610-
value = value.slice(0, value.length - 2);
614+
value = value.slice(0, -2);
611615
} else if (sfxS.test(value)) {
612616
// Remove last character.
613-
value = value.slice(0, value.length - 1);
617+
value = value.slice(0, -1);
614618
}
615619

616620
// Step 1b.
617621
if ((match = sfxEED.exec(value))) {
618622
if (gt0.test(match[1])) {
619623
// Remove last character.
620-
value = value.slice(0, value.length - 1);
624+
value = value.slice(0, -1);
621625
}
622626
} else if ((match = sfxEdOrIng.exec(value)) && vowelInStem.test(match[1])) {
623627
value = match[1];
@@ -627,7 +631,7 @@
627631
value += 'e';
628632
} else if (sfxMultiConsonantLike.test(value)) {
629633
// Remove last character.
630-
value = value.slice(0, value.length - 1);
634+
value = value.slice(0, -1);
631635
} else if (consonantLike.test(value)) {
632636
// Append `e`.
633637
value += 'e';
@@ -669,7 +673,7 @@
669673
}
670674

671675
if (sfxLl.test(value) && gt1.test(value)) {
672-
value = value.slice(0, value.length - 1);
676+
value = value.slice(0, -1);
673677
}
674678

675679
// Turn initial `Y` back to `y`.
@@ -889,7 +893,7 @@
889893
return function ( w ) {
890894
// Dont process stopwords
891895
if ( stopwords[w] === true ) return w;
892-
return stemmer_1( w );
896+
return stemmer( w );
893897
};
894898
}
895899

dist/thinker.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/thinker.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/thinker.min.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/thinker.min.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/thinker.mjs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,6 @@ function Index(options) {
511511
return exported;
512512
}
513513

514-
var stemmer_1 = stemmer;
515-
516514
// Standard suffix manipulations.
517515
var step2list = {
518516
ational: 'ate',
@@ -577,10 +575,16 @@ var step2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|izati
577575
var step3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
578576
var step4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
579577

580-
// Stem `value`.
581-
// eslint-disable-next-line complexity
578+
/**
579+
* Stem `value`.
580+
*
581+
* @param {string} value
582+
* @returns {string}
583+
*/
582584
function stemmer(value) {
585+
/** @type {boolean} */
583586
var firstCharacterWasLowerCaseY;
587+
/** @type {RegExpMatchArray} */
584588
var match;
585589

586590
value = String(value).toLowerCase();
@@ -601,17 +605,17 @@ function stemmer(value) {
601605
// Step 1a.
602606
if (sfxSsesOrIes.test(value)) {
603607
// Remove last two characters.
604-
value = value.slice(0, value.length - 2);
608+
value = value.slice(0, -2);
605609
} else if (sfxS.test(value)) {
606610
// Remove last character.
607-
value = value.slice(0, value.length - 1);
611+
value = value.slice(0, -1);
608612
}
609613

610614
// Step 1b.
611615
if ((match = sfxEED.exec(value))) {
612616
if (gt0.test(match[1])) {
613617
// Remove last character.
614-
value = value.slice(0, value.length - 1);
618+
value = value.slice(0, -1);
615619
}
616620
} else if ((match = sfxEdOrIng.exec(value)) && vowelInStem.test(match[1])) {
617621
value = match[1];
@@ -621,7 +625,7 @@ function stemmer(value) {
621625
value += 'e';
622626
} else if (sfxMultiConsonantLike.test(value)) {
623627
// Remove last character.
624-
value = value.slice(0, value.length - 1);
628+
value = value.slice(0, -1);
625629
} else if (consonantLike.test(value)) {
626630
// Append `e`.
627631
value += 'e';
@@ -663,7 +667,7 @@ function stemmer(value) {
663667
}
664668

665669
if (sfxLl.test(value) && gt1.test(value)) {
666-
value = value.slice(0, value.length - 1);
670+
value = value.slice(0, -1);
667671
}
668672

669673
// Turn initial `Y` back to `y`.
@@ -883,7 +887,7 @@ function englishStemmer ( stopwords ) {
883887
return function ( w ) {
884888
// Dont process stopwords
885889
if ( stopwords[w] === true ) return w;
886-
return stemmer_1( w );
890+
return stemmer( w );
887891
};
888892
}
889893

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "thinker-fts",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"description": "Pure Javascript/Node.js in-memory full text search engine.",
55
"author": "Hexagon <github.com/hexagon>",
66
"contributors": [

0 commit comments

Comments
 (0)