Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/szkiba/xk6-toml
A k6 extension enables to encode and decode TOML values
https://github.com/szkiba/xk6-toml
xk6 xk6-javascript-k6-x-toml
Last synced: about 2 months ago
JSON representation
A k6 extension enables to encode and decode TOML values
- Host: GitHub
- URL: https://github.com/szkiba/xk6-toml
- Owner: szkiba
- License: mit
- Created: 2021-05-12T12:54:56.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-13T09:31:18.000Z (3 months ago)
- Last Synced: 2024-10-24T13:58:27.370Z (about 2 months ago)
- Topics: xk6, xk6-javascript-k6-x-toml
- Language: JavaScript
- Homepage:
- Size: 60.5 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xk6-toml
A k6 extension enables k6 tests to comfortably encode and decode TOML values.
The underlying implementation is https://github.com/pelletier/go-toml
Built for [k6](https://go.k6.io/k6) using [xk6](https://github.com/grafana/xk6).
## Usage
Import an entire module's contents:
```JavaScript
import * as TOML from "k6/x/toml";
```Import a single export from a module:
```JavaScript
import { parse } from "k6/x/toml";
```## API
Functions:
- [parse](docs/README.md#parse)
- [stringify](docs/README.md#stringify)For complete API documentation click [here](docs/README.md)!
## Build
To build a `k6` binary with this extension, first ensure you have the prerequisites:
- [Go toolchain](https://go101.org/article/go-toolchain.html)
- GitThen:
1. Install `xk6`:
```bash
$ go install go.k6.io/xk6/cmd/xk6@latest
```2. Build the binary:
```bash
$ xk6 build --with github.com/szkiba/xk6-toml@latest
```