ic-ingredient-solver
v1.1.1
Published
Library to solve variable values to iClubs developers.
Downloads
1
Readme
ic-ingredient-solver
Library to solve variable values to iClubs developers.
Install
npm i ic-ingredient-solver
or
yarn add ic-ingredient-solver
Usage
import IngredientSolver from "ic-ingredient-solver"
This library constructor need to receive source data to resolve variable values, if just want to get variable values or resolve variable values, you can use the static methods from Ingredient Solver class.
Constructor:
const ingredientSolver = new IngredientSolver()
const response = await ingredientSolver.valueSolver()
This usage resolves a string and returns the final response.
Static Methods:
const response = IngredientSolver.getVariableValue()
This usage returns just value types and values from a string to resolve.
or
const response = IngredientSolver.resolveVariableValue()
This usage expects a value to resolve, your value type and many properties to returns a variable value solved.
OBS: This static method don't expect to receive a ('this.input') ingredient.
Contact
For support use iClubs contact channels.