@eryx/data/toml Module

Summary

Functions

toml.encode(value: any, options: EncodeOptions?) → string
toml.decode(source: string) → { [string]: any }
toml.parse(source: string) → { [string]: any }
toml.decodeCST(source: string) → any
toml.newCST() → any
toml.isCSTObject(value: any) → boolean
toml.cstToTable(value: any) → { [any]: any }
toml.cstSetStyle(value: any, path: any, style: string) → ()
toml.cstGetStyle(value: any, path: any) → string?
toml.cstSetComment(value: any, path: any, comment: string, where: string?) → ()
toml.cstGetComment(value: any, path: any, where: string?) → string?

API Reference

Functions

toml.encode

toml.encode(value: any, options: EncodeOptions?) → string

toml.decode

toml.decode(source: string) → { [string]: any }

toml.parse

toml.parse(source: string) → { [string]: any }

toml.decodeCST

toml.decodeCST(source: string) → any

toml.newCST

toml.newCST() → any

toml.isCSTObject

toml.isCSTObject(value: any) → boolean

toml.cstToTable

toml.cstToTable(value: any) → { [any]: any }

toml.cstSetStyle

toml.cstSetStyle(value: any, path: any, style: string) → ()

toml.cstGetStyle

toml.cstGetStyle(value: any, path: any) → string?

toml.cstSetComment

toml.cstSetComment(value: any, path: any, comment: string, where: string?) → ()

toml.cstGetComment

toml.cstGetComment(value: any, path: any, where: string?) → string?

Types

EncodeOptions

type EncodeOptions = { sortKeys: boolean? }
sortKeys: boolean?