Module: kdljs

Source:

Namespaces

formatter
parser
queryEngine
validator

Methods

(static) format(doc, optionsopt) → {string}

Parameters:
Name Type Attributes Default Description
doc module:kdljs~Document

Input KDL document

options module:kdljs.formatter.Options <optional>
{}

Formatting options

Source:
Returns:

formatted KDL file

Type
string

(static) parse(text) → {module:kdljs.parser.kdl.ParseResult}

Parameters:
Name Type Description
text string

Input KDL file (or fragment)

Source:
Returns:

Output

Type
module:kdljs.parser.kdl.ParseResult

(static) query(doc, queryString) → {any}

Parameters:
Name Type Description
doc module:kdljs~Document

Input KDL document

queryString module:kdljs~QueryString

Query for selecting and/or transforming results

Source:
Returns:
Type
any

(static) validateDocument(doc) → {boolean}

Parameters:
Name Type Description
doc module:kdljs~Document

KDL document

Source:
Returns:
Type
boolean

Type Definitions

Document

Type:
Source:

Node

A Node.

Type:
  • Object
Properties:
Name Type Description
name string

The name of the Node

values Array.<module:kdljs~Value>

Collection of Arguments

properties Object.<string, module:kdljs~Value>

Collection of Properties

children module:kdljs~Document

Nodes in the Children block

tags module:kdljs~NodeTypeAnnotations

Collection of type annotations

Source:

NodeTypeAnnotations

Type:
  • Object
Properties:
Name Type Description
name string

The type annotation of the Node

values Array.<string>

The type annotations of the Arguments

properties Object.<string, string>

The type annotations of the Properties

Source:

QueryString

Type:
  • string
Source:

Value

A Value.

Type:
  • string | number | boolean | null
Source: