Skip to content

YamlSeq

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:10

The yaml node, tag and visitor model, re-exported so a caller can write a custom tag without taking its own dependency on yaml.

Names are Yaml-prefixed rather than kept as upstream. This package’s index is a flat export *, so a bare Node, Document, Scalar or Schema would sit beside YamlParseStream and parseYaml under names that say nothing about YAML — and Node and Document are DOM globals, which this package, being portable, is expected to be imported alongside.

  • Collection

T = unknown

new YamlSeq<T>(schema?): YAMLSeq<T>

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:20

YamlSchema

YAMLSeq<T>

Collection.constructor

[NODE_TYPE]: symbol

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Collection.d.ts:8

Collection.[NODE_TYPE]


optional addToJSMap?: (ctx, map, value) => void

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Node.d.ts:44

Customize the way that a key-value pair is resolved. Used for YAML 1.1 !!merge << handling.

YamlToJsContext | undefined

MapLike

unknown

void

Collection.addToJSMap


optional anchor?: string

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Collection.d.ts:11

An optional anchor on this node. Used by alias nodes.

Collection.anchor


optional comment?: string | null

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Node.d.ts:24

A comment on or immediately after this

Collection.comment


optional commentBefore?: string | null

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Node.d.ts:26

A comment before this

Collection.commentBefore


optional flow?: boolean

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Collection.d.ts:16

If true, stringify this and all child nodes using flow rather than block styles.

Collection.flow


items: T[]

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:19

Collection.items


optional range?: YamlRange | null

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Node.d.ts:33

The [start, value-end, node-end] character offsets for the part of the source parsed into this node (undefined if not parsed). The value-end and node-end positions are themselves not included in their respective ranges.

Collection.range


schema: YamlSchema | undefined

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Collection.d.ts:7

Collection.schema


optional spaceBefore?: boolean

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Node.d.ts:35

A blank line before this node and its commentBefore

Collection.spaceBefore


optional srcToken?: Token

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Node.d.ts:37

The CST token that was composed into this node.

Collection.srcToken


optional tag?: string

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Node.d.ts:39

A fully qualified tag, if required

Collection.tag

get static tagName(): "tag:yaml.org,2002:seq"

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:18

"tag:yaml.org,2002:seq"

add(value): void

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:21

Adds a value to the collection.

T

void

Collection.add


addIn(path, value): void

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Collection.d.ts:51

Adds a value to the collection. For !!map and !!omap the value must be a Pair instance or a { key, value } object, which may not have a key that already exists in the map.

Iterable<unknown>

unknown

void

Collection.addIn


clone(schema?): Collection

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Collection.d.ts:23

Create a copy of this collection.

YamlSchema

If defined, overwrites the original’s schema

Collection

Collection.clone


delete(key): boolean

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:30

Removes a value from the collection.

key must contain a representation of an integer for this to succeed. It may be wrapped in a Scalar.

unknown

boolean

true if the item was found and removed.

Collection.delete


deleteIn(path): boolean

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Collection.d.ts:56

Removes a value from the collection.

Iterable<unknown>

boolean

true if the item was found and removed.

Collection.deleteIn


get(key, keepScalar): YamlScalar<T> | undefined

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:39

Returns item at key, or undefined if not found. By default unwraps scalar values from their surrounding node; to disable set keepScalar to true (collections are always returned intact).

key must contain a representation of an integer for this to succeed. It may be wrapped in a Scalar.

unknown

true

YamlScalar<T> | undefined

Collection.get

get(key, keepScalar?): T | undefined

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:40

Returns item at key, or undefined if not found. By default unwraps scalar values from their surrounding node; to disable set keepScalar to true (collections are always returned intact).

key must contain a representation of an integer for this to succeed. It may be wrapped in a Scalar.

unknown

false

T | undefined

Collection.get

get(key, keepScalar?): T | YamlScalar<T> | undefined

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:41

Returns item at key, or undefined if not found. By default unwraps scalar values from their surrounding node; to disable set keepScalar to true (collections are always returned intact).

key must contain a representation of an integer for this to succeed. It may be wrapped in a Scalar.

unknown

boolean

T | YamlScalar<T> | undefined

Collection.get


getIn(path, keepScalar?): unknown

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Collection.d.ts:62

Returns item at key, or undefined if not found. By default unwraps scalar values from their surrounding node; to disable set keepScalar to true (collections are always returned intact).

Iterable<unknown>

boolean

unknown

Collection.getIn


has(key): boolean

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:48

Checks if the collection includes a value with the key key.

key must contain a representation of an integer for this to succeed. It may be wrapped in a Scalar.

unknown

boolean

Collection.has


hasAllNullValues(allowScalar?): boolean

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Collection.d.ts:63

boolean

boolean

Collection.hasAllNullValues


hasIn(path): boolean

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Collection.d.ts:67

Checks if the collection includes a value with the key key.

Iterable<unknown>

boolean

Collection.hasIn


set(key, value): void

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:56

Sets a value in this collection. For !!set, value needs to be a boolean to add/remove the item from the set.

If key does not contain a representation of an integer, this will throw. It may be wrapped in a Scalar.

unknown

T

void

Collection.set


setIn(path, value): void

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Collection.d.ts:72

Sets a value in this collection. For !!set, value needs to be a boolean to add/remove the item from the set.

Iterable<unknown>

unknown

void

Collection.setIn


toJS(doc, __namedParameters?): any

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/Node.d.ts:52

A plain JavaScript representation of this node.

YamlDocument<YamlNode<unknown>, boolean>

ToJSOptions

any

Collection.toJS


toJSON(_?, ctx?): unknown[]

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:57

A plain JS representation of this node

unknown

YamlToJsContext

unknown[]

Collection.toJSON


toString(ctx?, onComment?, onChompKeep?): string

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:58

YamlStringifyContext

() => void

() => void

string

Collection.toString


static from(schema, obj, ctx): YAMLSeq

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/nodes/YAMLSeq.d.ts:59

YamlSchema

unknown

YamlCreateNodeContext

YAMLSeq