Skip to main content

mergeSuggestions

Stentor API Reference


Stentor API Reference / stentor-utils/src / mergeSuggestions

Function: mergeSuggestions()

mergeSuggestions(existing, incoming?): SuggestionTypes[]

Defined in: packages/stentor-utils/src/response.ts:219

Merges new suggestions onto existing suggestions.

It will look for duplicates on the existing from the incoming.

If it finds one, it will replace the existing with the incoming while keeping the index.

Parameters​

existing​

SuggestionTypes[]

incoming?​

SuggestionTypes[]

Returns​

SuggestionTypes[]