@jclind/ingredient-parser 1.0.12 → 1.0.13
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.
- package/dist/api/http.d.ts +2 -0
- package/dist/api/requests.d.ts +4 -0
- package/dist/funcs/calculatePrice.d.ts +1 -0
- package/dist/funcs/editIngredientString.d.ts +4 -0
- package/dist/funcs/getIngredientInfo.d.ts +1 -0
- package/dist/funcs/getSpoonacularIngrData.d.ts +1 -0
- package/dist/funcs/ingredientParser.d.ts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
- package/src/index.ts +0 -13
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const checkIngredient: (name: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
2
|
+
export declare const searchIngredient: (name: string, spoonacularAPIKey: any) => Promise<any>;
|
|
3
|
+
export declare const getIngredientInformation: (ingrId: number, spoonacularAPIKey: any) => Promise<any>;
|
|
4
|
+
export declare const setMongoDBIngrData: (data: any) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const calculatePrice: (quantity: number, unit: string, price: number) => number | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getIngredientInfo(ingrName: string, spoonacularAPIKey: string): Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getSpoonacularIngrData(name: string, spoonacularAPIKey: string): Promise<any>;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import ingredientParser from './funcs/ingredientParser.js';
|
|
2
|
+
import { ParsedIngredient as ParsedIngredientType, IngredientData as IngredientDataType, IngredientResponse as IngredientResponseType } from '../types.js';
|
|
3
|
+
export { ingredientParser, ParsedIngredientType, IngredientDataType, IngredientResponseType, };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,6BAA6B,CAAA;AAO1D,OAAO,EACL,gBAAgB,GAIjB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jclind/ingredient-parser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Parses given sentence including ingredient information and attemps to return quantity, measurement and ingredient data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"recipe",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"parse",
|
|
9
9
|
"units"
|
|
10
10
|
],
|
|
11
|
-
"main": "
|
|
12
|
-
"types": "
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"types": "dist/index.d.ts",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
@@ -33,7 +33,10 @@
|
|
|
33
33
|
"convert-units": "^2.3.4",
|
|
34
34
|
"dotenv": "^16.0.3",
|
|
35
35
|
"parse-ingredient": "^0.6.0",
|
|
36
|
-
"recipe-ingredient-parser-v3": "^1.2.18"
|
|
36
|
+
"recipe-ingredient-parser-v3": "^1.2.18"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^18.11.18",
|
|
37
40
|
"typescript": "^4.9.4"
|
|
38
41
|
}
|
|
39
42
|
}
|
package/src/index.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import ingredientParser from './funcs/ingredientParser.js'
|
|
2
|
-
import {
|
|
3
|
-
ParsedIngredient as ParsedIngredientType,
|
|
4
|
-
IngredientData as IngredientDataType,
|
|
5
|
-
IngredientResponse as IngredientResponseType,
|
|
6
|
-
} from './types/types.js'
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
ingredientParser,
|
|
10
|
-
ParsedIngredientType,
|
|
11
|
-
IngredientDataType,
|
|
12
|
-
IngredientResponseType,
|
|
13
|
-
}
|