fast-ini-encoder
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

fast-ini-encoder

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.

Synopsis

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

API

See also the TypeScript types.

encode(file: object): object

Encodes a file JSON object to an AST object.

Package Sidebar

Install

npm i fast-ini-encoder

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

17.1 kB

Total Files

14

Last publish

Collaborators

  • prantlf