@jclind/ingredient-parser 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,15 +26,11 @@ const replaceModifiedWords = (words, str) => {
|
|
|
26
26
|
};
|
|
27
27
|
const parseStringConsecutiveTs = (ingrStr) => {
|
|
28
28
|
var _a;
|
|
29
|
-
// const ingrStrToLower = ingrStr.toLowerCase()
|
|
30
29
|
const removeTTsIngrName = ingrStr.replace(/t{2,}/g, '');
|
|
31
30
|
const modifiedWords = removeConsecutiveTs(ingrStr);
|
|
32
|
-
console.log(modifiedWords);
|
|
33
31
|
if (modifiedWords.length > 0) {
|
|
34
32
|
const parsedIngrNoTs = (0, recipe_ingredient_parser_v3_1.parse)(removeTTsIngrName, 'eng');
|
|
35
|
-
console.log(parsedIngrNoTs);
|
|
36
33
|
const correctIngrStr = replaceModifiedWords(modifiedWords, (_a = parsedIngrNoTs.ingredient) !== null && _a !== void 0 ? _a : '');
|
|
37
|
-
console.log(correctIngrStr);
|
|
38
34
|
const parsedIngr = Object.assign(Object.assign({}, parsedIngrNoTs), { ingredient: correctIngrStr });
|
|
39
35
|
return parsedIngr;
|
|
40
36
|
}
|
package/package.json
CHANGED