Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/nodeca/js-yaml
/ functions
Functions
242 in github.com/nodeca/js-yaml
⨍
Functions
242
◇
Types & classes
63
↓ 27 callers
Function
load
* Parses `string` as a single YAML document. Throws {@link YAMLException} on * error. This function does not understand multi-document or empty sourc
src/load.ts:105
↓ 21 callers
Function
dump
* Serializes JS object as a YAML document. By default it can dump every * supported YAML type, so it throws an exception if you try to dump regexps o
src/dump.ts:103
↓ 20 callers
Function
defineScalarTag
* Create a normalized scalar tag definition. * * @category Tags
src/tag.ts:204
↓ 16 callers
Function
throwError
(state: ParserState, message: string)
src/parser/parser.ts:249
↓ 13 callers
Method
toString
* Returns the formatted error, omitting the source snippet in compact mode.
src/common/exception.ts:55
↓ 11 callers
Function
isWsOrEol
(c: number)
src/parser/parser.ts:261
↓ 11 callers
Method
withTags
* Creates a new schema with the specified tags added. If a tag already * exists, it is replaced by the specified tag. * * @example * *
src/schema.ts:246
↓ 9 callers
Function
isEol
(c: number)
src/parser/parser.ts:253
↓ 9 callers
Function
parseEvents
* Parses YAML into a flat event stream referencing source text by offsets. * * @category Events
src/parser/parser.ts:1460
↓ 9 callers
Function
skipSeparationSpace
(state: ParserState, allowComments: boolean)
src/parser/parser.ts:333
↓ 8 callers
Function
loadAll
( input: string, iteratorOrOptions?: LoadAllIterator | LoadOptions | null, options?: LoadOptions )
src/load.ts:56
↓ 7 callers
Function
throwError
(state: ConstructorState, message: string)
src/parser/constructor.ts:143
↓ 6 callers
Function
addScalarEvent
( state: ParserState, valueStart: number, valueEnd: number, anchorStart: number, anchorEnd: number,
src/parser/parser.ts:163
↓ 6 callers
Function
defineMappingTag
* Create a normalized mapping tag definition. * * @category Tags
src/tag.ts:246
↓ 6 callers
Function
isFlowIndicator
(c: number)
src/parser/parser.ts:269
↓ 6 callers
Function
isWhiteSpace
(c: number)
src/parser/parser.ts:257
↓ 5 callers
Function
isWsOrEolOrEnd
(c: number)
src/parser/parser.ts:265
↓ 5 callers
Function
tagNameFull
(rawTag: string, tagHandlers?: Readonly<Record<string, string>>)
src/common/tagname.ts:13
↓ 5 callers
Function
visit
* Walk every node in the documents, calling {@link Visitor} once per * node (pre-order). * * @category AST
src/ast/visit.ts:82
↓ 5 callers
Function
writeNode
(state: PresenterState, level: number, node: Node, parent: Readonly<Node> | null, ctx: NodeContext)
src/ast/presenter.ts:364
↓ 4 callers
Function
addEmptyScalarEvent
(state: ParserState)
src/parser/parser.ts:207
↓ 4 callers
Function
addPopEvent
(state: ParserState)
src/parser/parser.ts:203
↓ 4 callers
Function
defineSequenceTag
* Create a normalized sequence tag definition. * * @category Tags
src/tag.ts:223
↓ 4 callers
Function
eventsToAst
* Builds an AST from parser events * * @category AST
src/ast/from_events.ts:141
↓ 4 callers
Function
getScalarValue
* Decodes the scalar referenced by event offsets in `input`. * * @category Events
src/parser/parser_scalar.ts:285
↓ 4 callers
Function
hasBit
(mask: number, bit: number)
src/ast/styler_defaults.ts:4
↓ 4 callers
Function
parseNode
( state: ParserState, parentIndent: number, nodeContext: NodeContext, allowToSeek: boolean, allowCom
src/parser/parser.ts:1171
↓ 4 callers
Function
present
* Build YAML from AST. * * @category AST
src/ast/presenter.ts:490
↓ 4 callers
Function
snapshotState
(state: ParserState)
src/parser/parser.ts:229
↓ 4 callers
Function
tagNameShort
(fullTag: string)
src/common/tagname.ts:25
↓ 4 callers
Function
testDocumentSeparator
(state: ParserState, position = state.position)
src/parser/parser.ts:369
↓ 4 callers
Method
throwAt
* Builds a YAMLException with a source snippet and throws it. `source` is * the raw input text; `position` is an offset into it.
src/common/exception.ts:63
↓ 3 callers
Function
build
(state: FromJsState, object: unknown)
src/ast/from_js.ts:93
↓ 3 callers
Function
consumeLineBreak
(state: ParserState)
src/parser/parser.ts:317
↓ 3 callers
Function
foldedBreaks
(count: number)
src/parser/parser_scalar.ts:95
↓ 3 callers
Function
isPlainObject
(data: unknown)
src/common/object.ts:1
↓ 3 callers
Function
jsToAst
* Convert JS object to AST. A JS value is one YAML document. An unrepresentable * root becomes an empty document, which the presenter renders as an e
src/ast/from_js.ts:173
↓ 3 callers
Function
normalizeDumpMarkers
(yaml)
test/spec/spec.test.mjs:178
↓ 3 callers
Method
resolveImplicitScalarTag
@internal
src/schema.ts:221
↓ 3 callers
Function
restoreState
(state: ParserState, snapshot: ParserSnapshot)
src/parser/parser.ts:240
↓ 3 callers
Function
skipFoldedBreaks
(input: string, position: number, end: number)
src/parser/parser_scalar.ts:70
↓ 3 callers
Function
testDocumentBoundary
(state: ParserState)
src/parser/parser.ts:390
↓ 3 callers
Function
unescapeFixtureText
(text)
test/spec/spec.test.mjs:47
↓ 2 callers
Function
_preferredQuotedStyle
(layout: ScalarLayout)
src/ast/styler_defaults.ts:27
↓ 2 callers
Function
addMappingEvent
( state: ParserState, start: number, anchorStart: number, anchorEnd: number, tagStart: number, tag
src/parser/parser.ts:131
↓ 2 callers
Function
addSequenceEvent
( state: ParserState, start: number, anchorStart: number, anchorEnd: number, tagStart: number, tag
src/parser/parser.ts:111
↓ 2 callers
Function
addSignaturePermalink
(context, signature, anchor)
support/typedoc_condensed_theme/condensed_theme_plugin.mjs:77
↓ 2 callers
Function
anchorName
(state: FromEventsState, event: ScalarEvent | SequenceEvent | MappingEvent)
src/ast/from_events.ts:78
↓ 2 callers
Function
blockHeader
(string: string, shiftOfParent: number, shiftOfContent: number)
src/ast/scalar_styler.ts:322
↓ 2 callers
Function
cannotBeCompact
(state: PresenterState, node: Node, level: number)
src/ast/presenter.ts:359
↓ 2 callers
Function
checkPrintable
(state: ParserState, start: number, end: number)
src/parser/parser.ts:419
↓ 2 callers
Function
constructFromEvents
* Constructs JavaScript documents directly from parser events, without an * intermediate AST. * * @category Events
src/parser/constructor.ts:365
↓ 2 callers
Function
dropEndingNewline
(string: string)
src/ast/scalar_styler.ts:336
↓ 2 callers
Function
encodeFlowBreaks
(string: string, shiftOfContent: number)
src/ast/scalar_styler.ts:271
↓ 2 callers
Function
finalizeCollection
( state: ConstructorState, position: number, tag: SequenceTagDefinition<any, any> | MappingTagDefinition
src/parser/constructor.ts:147
↓ 2 callers
Function
formatError
(exception: YAMLException, compact?: boolean)
src/common/exception.ts:5
↓ 2 callers
Function
formatRange
(input, start, end)
test/spec/spec.test.mjs:90
↓ 2 callers
Function
generateNextLine
(state: PresenterState, level: number)
src/ast/presenter.ts:165
↓ 2 callers
Function
indentString
(string: string, spaces: number)
src/ast/scalar_styler.ts:292
↓ 2 callers
Function
isMappingTag
(tag: AnyTag)
src/parser/constructor.ts:237
↓ 2 callers
Function
isMoreIndented
(char: string)
src/ast/scalar_styler.ts:340
↓ 2 callers
Function
labelOf
test/core/ast/visit.test.mjs:13
↓ 2 callers
Function
loadDocuments
(input: string, options: LoadOptions = {})
src/load.ts:26
↓ 2 callers
Method
lookupMappingTag
@internal
src/schema.ts:209
↓ 2 callers
Method
lookupSequenceTag
@internal
src/schema.ts:197
↓ 2 callers
Function
parse
()
support/demo_template/index.mjs:34
↓ 2 callers
Function
pick
(object: T, keys: readonly K[])
src/common/object.ts:10
↓ 2 callers
Function
rawTag
(state: FromEventsState, event: ScalarEvent | SequenceEvent | MappingEvent)
src/ast/from_events.ts:72
↓ 2 callers
Function
readFlowScalarBreak
(state: ParserState, nodeIndent: number)
src/parser/parser.ts:527
↓ 2 callers
Function
renderWithoutSources
(item, render)
support/typedoc_condensed_theme/condensed_theme_plugin.mjs:56
↓ 2 callers
Function
signatureItem
(context, signature, permalinkAnchor, itemClass)
support/typedoc_condensed_theme/condensed_theme_plugin.mjs:103
↓ 2 callers
Function
signatureList
(context, declaration, items)
support/typedoc_condensed_theme/condensed_theme_plugin.mjs:126
↓ 2 callers
Function
skipByteOrderMark
(state: ParserState)
src/parser/parser.ts:382
↓ 2 callers
Function
sourceLinks
(context, item)
support/typedoc_condensed_theme/condensed_theme_plugin.mjs:44
↓ 2 callers
Function
tagHandlersFromDirectives
(directives)
test/spec/spec.test.mjs:116
↓ 1 callers
Function
actualTreeLines
(input)
test/spec/spec.test.mjs:132
↓ 1 callers
Function
addAliasEvent
( state: ParserState, anchorStart: number, anchorEnd: number )
src/parser/parser.ts:191
↓ 1 callers
Function
addDocumentEvent
( state: ParserState, explicitStart: boolean, explicitEnd: boolean )
src/parser/parser.ts:98
↓ 1 callers
Function
addMappingValue
(state: ConstructorState, frame: MappingFrame, key: unknown, value: unknown, tag: AnyTag)
src/parser/constructor.ts:296
↓ 1 callers
Function
addNode
(state: FromEventsState, node: Node)
src/ast/from_events.ts:121
↓ 1 callers
Function
addValue
(state: ConstructorState, value: unknown, tag: AnyTag)
src/parser/constructor.ts:314
↓ 1 callers
Function
alias
test/core/ast/visit.test.mjs:9
↓ 1 callers
Function
anchorIcon
(context, anchor)
support/typedoc_condensed_theme/condensed_theme_plugin.mjs:67
↓ 1 callers
Function
assertYamlException
(fn, pattern)
test/core/pathological.test.mjs:4
↓ 1 callers
Function
buildCollection
( state: FromEventsState, event: SequenceEvent | MappingEvent, defaultTagName: string )
src/ast/from_events.ts:102
↓ 1 callers
Function
buildDeclarations
()
support/build-dist.mjs:22
↓ 1 callers
Function
buildRepresentTypes
(schema: Schema)
src/ast/from_js.ts:50
↓ 1 callers
Function
buildScalar
(state: FromEventsState, event: ScalarEvent)
src/ast/from_events.ts:84
↓ 1 callers
Function
canStartPlainScalar
(state: ParserState, nodeContext: NodeContext)
src/parser/parser.ts:763
↓ 1 callers
Function
canUseBlock
(layout: ScalarLayout)
src/ast/scalar_styler.ts:183
↓ 1 callers
Function
canUsePlain
(layout: ScalarLayout)
src/ast/scalar_styler.ts:125
↓ 1 callers
Function
canUseSingleQuoted
(layout: ScalarLayout)
src/ast/scalar_styler.ts:161
↓ 1 callers
Function
charFromCodepoint
(c: number)
src/parser/parser_scalar.ts:42
↓ 1 callers
Function
chargeMergeWork
(state: ConstructorState)
src/parser/constructor.ts:241
↓ 1 callers
Function
checkExports
(yaml, options)
test/core/dist.test.mjs:8
↓ 1 callers
Function
checkName
(name)
benchmark/benchmark.mjs:80
↓ 1 callers
Function
collect
(documents, control)
test/core/ast/visit.test.mjs:19
↓ 1 callers
Function
collectionTagName
( state: ConstructorState, event: SequenceEvent | MappingEvent, defaultTagName: string )
src/parser/constructor.ts:221
↓ 1 callers
Function
compileTags
(tags: readonly TagDefinition[])
src/schema.ts:58
↓ 1 callers
Function
constructScalar
( state: ConstructorState, event: ScalarEvent )
src/parser/constructor.ts:166
next →
1–100 of 242, ranked by callers