Comparing version 0.2.3 to 0.2.5
@@ -11,4 +11,5 @@ import { Person, CNumber, Tense, Mood, Form } from './constants'; | ||
word: string; | ||
isIrregular: boolean; | ||
} | ||
declare function extract(html: string): Array<ConjugationResult>; | ||
export default extract; |
@@ -72,2 +72,4 @@ "use strict"; | ||
return constants_1.Tense.Future; | ||
case 'informal': | ||
return constants_1.Tense.Informal; | ||
case 'imperative': | ||
@@ -107,12 +109,16 @@ return constants_1.Tense.Affirmative; | ||
function convertParadigmToConjugationResults(paradigm, data) { | ||
return data.map((item) => ({ | ||
pronoun: item.pronoun, | ||
person: convertPronounToPerson(item.pronoun), | ||
number: convertPronounToNumber(item.pronoun), | ||
tense: convertParadigmToTense(paradigm), | ||
mood: convertParadigmToMood(paradigm), | ||
form: convertParadigmToForm(paradigm), | ||
paradigm: paradigm, | ||
word: item.word | ||
})); | ||
return data.map((item) => { | ||
var _a; | ||
return ({ | ||
pronoun: item.pronoun, | ||
person: convertPronounToPerson(item.pronoun), | ||
number: convertPronounToNumber(item.pronoun), | ||
tense: convertParadigmToTense(paradigm), | ||
mood: convertParadigmToMood(paradigm), | ||
form: convertParadigmToForm(paradigm), | ||
paradigm: paradigm, | ||
word: item.word, | ||
isIrregular: (_a = item.isIrregular) !== null && _a !== void 0 ? _a : false, | ||
}); | ||
}); | ||
} | ||
@@ -119,0 +125,0 @@ function extract(html) { |
@@ -26,2 +26,3 @@ declare enum Gender { | ||
Future = "future", | ||
Informal = "informal", | ||
Affirmative = "affirmative", | ||
@@ -28,0 +29,0 @@ Negative = "negative", |
@@ -38,2 +38,3 @@ "use strict"; | ||
Tense["Future"] = "future"; | ||
Tense["Informal"] = "informal"; | ||
Tense["Affirmative"] = "affirmative"; | ||
@@ -40,0 +41,0 @@ Tense["Negative"] = "negative"; |
{ | ||
"name": "sdapi", | ||
"version": "0.2.3", | ||
"version": "0.2.5", | ||
"description": "Unofficial APIs of SpanishDict.com", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
84247
2350
0