Class: CodeSplitter()
Extends
CodeSplitter<
Options
>(nodes
,options
?):BaseNode
<Metadata
>[]
Type Parameters
• Options extends Record
<string
, unknown
>
Parameters
• options?: Options
Returns
Defined in
packages/node-parser/code/dist/index.d.ts:11
Constructors
new CodeSplitter()
new CodeSplitter(
params
):CodeSplitter
Parameters
• params: CodeSplitterParam
Returns
Overrides
Defined in
packages/node-parser/code/dist/index.d.ts:14
Properties
id
id:
string
Inherited from
Defined in
packages/core/schema/dist/index.d.ts:171
includeMetadata
includeMetadata:
boolean
Inherited from
Defined in
packages/core/node-parser/dist/index.d.ts:6
includePrevNextRel
includePrevNextRel:
boolean
Inherited from
TextSplitter
.includePrevNextRel
Defined in
packages/core/node-parser/dist/index.d.ts:7
maxChars
maxChars:
number
Defined in
packages/node-parser/code/dist/index.d.ts:13
Methods
getNodesFromDocuments()
Parameters
• documents: TextNode
<Metadata
>[]
Returns
Inherited from
TextSplitter
.getNodesFromDocuments
Defined in
packages/core/node-parser/dist/index.d.ts:11
parseNodes()
Parameters
Returns
Inherited from
Defined in
packages/core/node-parser/dist/index.d.ts:16
postProcessParsedNodes()
protected
postProcessParsedNodes(nodes
,parentDocMap
):TextNode
<Metadata
>[]
Parameters
• parentDocMap: Map
<string
, TextNode
<Metadata
>>
Returns
Inherited from
TextSplitter
.postProcessParsedNodes
Defined in
packages/core/node-parser/dist/index.d.ts:9
splitText()
splitText(
text
):string
[]
Parameters
• text: string
Returns
string
[]
Overrides
Defined in
packages/node-parser/code/dist/index.d.ts:15
splitTexts()
splitTexts(
texts
):string
[]
Parameters
• texts: string
[]
Returns
string
[]
Inherited from
Defined in
packages/core/node-parser/dist/index.d.ts:15