diff options
Diffstat (limited to 'toml/README.md')
| -rw-r--r-- | toml/README.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/toml/README.md b/toml/README.md index b19974b2e..f4ae25857 100644 --- a/toml/README.md +++ b/toml/README.md @@ -91,6 +91,8 @@ will output: ## Usage +### Parse + ```ts import { parseFile, parse } from "./parser.ts"; @@ -99,3 +101,17 @@ const tomlObject = parseFile("file.toml"); const tomlString = 'foo.bar = "Deno"'; const tomlObject22 = parse(tomlString); ``` + +### Stringify + +```ts +import { stringify } from "./parser.ts"; +const obj = { + bin: [ + { name: "deno", path: "cli/main.rs" }, + { name: "deno_core", path: "src/foo.rs" } + ], + nib: [{ name: "node", path: "not_found" }] +}; +const tomlString = stringify(obj); +``` |
