Skip to main content

getFertilizersCatalogue

@svenvw/fdm-source


@svenvw/fdm-source / fdm-data/src / getFertilizersCatalogue

Function: getFertilizersCatalogue()

getFertilizersCatalogue(catalogueName): Promise<CatalogueFertilizer>

Defined in: fdm-data/src/fertilizers/index.ts:25

Retrieves a fertilizer catalogue based on the specified name.

This function acts as a dispatcher, selecting and returning the appropriate fertilizer catalogue based on the provided catalogueName.

Parameters

catalogueName

CatalogueFertilizerName

The name of the desired fertilizer catalogue. Currently supported names are: "srm" and "baat".

Returns

Promise<CatalogueFertilizer>

An array of CatalogueFertilizerItem objects representing the requested fertilizer catalogue.

Throws

Throws an error if the provided catalogueName is not recognized or supported.

Example

const srmCatalogue = await getFertilizersCatalogue("srm");
console.log(srmCatalogue);