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
Name | Type |
---|---|
T | extends Record <string , unknown > |
Parameters
Name | Type |
---|---|
text | string |
language? | string |
delimiter? | string |
Returns
Object
Name | Type |
---|---|
body | string |
metadata? | T |
Defined in
packages/mongodb-rag-core/build/frontMatter/extractFrontMatter.d.ts:7
removeFrontMatter
▸ removeFrontMatter(content
, options?
): string
Parameters
Name | Type |
---|---|
content | string |
options? | FrontMatterOptions |
Returns
string
Defined in
packages/mongodb-rag-core/build/frontMatter/removeFrontMatter.d.ts:2
updateFrontMatter
▸ updateFrontMatter(text
, metadataIn
): string
Parameters
Name | Type |
---|---|
text | string |
metadataIn | Record <string , unknown > |
Returns
string
Defined in
packages/mongodb-rag-core/build/frontMatter/updateFrontMatter.d.ts:1