Skip to content

Latest commit

 

History

History
145 lines (84 loc) · 2.86 KB

modules.md

File metadata and controls

145 lines (84 loc) · 2.86 KB

index.md - v1.1.0 / Exports

index.md - v1.1.0

Table of contents

Variables

Functions

Variables

default

default: Object

Type declaration

Name Type
loadToml (path: string | URL | Buffer) => Promise<unknown | null>
loadTomlSync (path: string | URL | Buffer) => unknown | null
parseToml (data: string) => JsonMap | null
stringifyToml (data: JsonMap) => string | null

Defined in

index.ts:88

Functions

loadToml

loadToml(path): Promise<unknown | null>

load .toml

Example

import { loadToml } from 'load-toml'
const data = await loadToml('/path/of/toml') // \{ "name": "saqqdy" \}

Parameters

Name Type Description
path string | URL | Buffer file path

Returns

Promise<unknown | null>

  • result

Defined in

index.ts:61


loadTomlSync

loadTomlSync(path): unknown | null

load .toml sync

Example

import { loadTomlSync } from 'load-toml'
const data = loadTomlSync('/path/of/toml') // \{ "name": "saqqdy" \}

Parameters

Name Type Description
path string | URL | Buffer file path

Returns

unknown | null

  • result

Defined in

index.ts:80


parseToml

parseToml(data): JsonMap | null

parse toml data

Parameters

Name Type Description
data string file path

Returns

JsonMap | null

  • result

Defined in

index.ts:26


stringifyToml

stringifyToml(data): string | null

stringify toml data

Parameters

Name Type Description
data JsonMap file path

Returns

string | null

  • result

Defined in

index.ts:41