Skip to main content

Namespace: FrontMatter

Functions

extractFrontMatter

extractFrontMatter<T>(text, language?, delimiter?): Object

This function extracts frontmatter from a string. The generic type does not validate that the frontmatter conforms to the type. It just provides the type for developer convenience.

Type parameters

NameType
Textends Record<string, unknown>

Parameters

NameType
textstring
language?string
delimiter?string

Returns

Object

NameType
bodystring
metadata?T

Defined in

packages/mongodb-rag-core/build/frontMatter/extractFrontMatter.d.ts:7


removeFrontMatter

removeFrontMatter(content, options?): string

Parameters

NameType
contentstring
options?FrontMatterOptions

Returns

string

Defined in

packages/mongodb-rag-core/build/frontMatter/removeFrontMatter.d.ts:2


updateFrontMatter

updateFrontMatter(text, metadataIn): string

Parameters

NameType
textstring
metadataInRecord<string, unknown>

Returns

string

Defined in

packages/mongodb-rag-core/build/frontMatter/updateFrontMatter.d.ts:1