This commit is contained in:
lingdocs 2022-05-17 15:10:42 -05:00
parent 3e1d6d0cea
commit 3c8c16b73c
4 changed files with 1845 additions and 1792 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/lingdocs-main",
"version": "0.2.9",
"version": "0.3.0",
"description": "types and functions for lingdocs stuff",
"main": "dist/library.js",
"module": "dist/library.js",
@ -22,13 +22,16 @@
"author": "lingdocs.com",
"license": "MIT",
"dependencies": {
"@lingdocs/pashto-inflector": "2.5.5",
"lokijs": "^1.5.12",
"nano": "^9.0.5",
"passport-github2": "^0.1.12",
"passport-google-oauth": "^2.0.0",
"passport-twitter": "^1.0.4",
"@lingdocs/pashto-inflector": "2.5.5"
"supermemo": "^2.0.17"
},
"devDependencies": {
"@types/lokijs": "^1.5.7",
"@types/passport-github2": "^1.2.5",
"@types/passport-google-oauth": "^1.0.42",
"@types/passport-twitter": "^1.0.37",

View File

@ -1,4 +1,4 @@
import loki from "lokijs";
import loki, { Collection } from "lokijs";
import {
Types as T,
readDictionary,

View File

@ -111,7 +111,7 @@ function alphabeticalLookup({ searchString, page }: {
{g: { $regex: r }},
],
});
const indexNumbers = regexResults.map((mpd) => mpd.i);
const indexNumbers = regexResults.map((mpd: any) => mpd.i);
// Find the first matching word occuring first in the Pashto Index
let firstIndexNumber = null;
if (indexNumbers.length) {
@ -270,7 +270,7 @@ function pashtoFuzzyLookup<S extends T.DictionaryEntry>({ searchString, page, tp
.limit(exactResultsLimit)
.simplesort("i")
.data();
resultsGiven = exactResults.map((mpd) => mpd.$loki);
resultsGiven = exactResults.map((mpd: any) => mpd.$loki);
// Get fuzzy matches
const pashtoRegExLogic = fuzzifyPashto(search, {

3624
yarn.lock

File diff suppressed because it is too large Load Diff