Encodes JSON objects to INI files with great performance.
- Extremely fast.
- Offers ES, CJS and UMD modules.
- Includes TypeScript types.
- No dependencies.
- Tiny size - 367 B minified, 263 B gzipped, 235 B brotlied.
This is currently work in progress.
import { encode } from 'fast-ini-encoder'
import { format } from 'fast-ini-formatter'
const file = {
"scope": "global",
"database": {
"user": "dbuser",
"password": "dbpassword",
"database": "use_this_database"
}
}
const ast = encode(file)
await format('app.ini', ast)
// Output:
//
// scope = global
//
// [database]
// user = dbuser
// password = dbpassword
// database = use_this_database
See also the TypeScript types.
Encodes a file
JSON object to an AST object.