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

0.0.1 • Public • Published

fast-ini-decoder

Decodes AST to a JSON object with great performance.

  • Extremely fast.
  • Offers ES, CJS and UMD modules.
  • Includes TypeScript types.
  • No dependencies.
  • Tiny size - reader - 245 B minified, 191 B gzipped, 162 B brotlied.

This is currently work in progress.

Synopsis

import { parseText } from 'fast-ini-parser'
import { decode } from 'fast-ini-decoder'

const ini = `
scope = global

[database]
user = dbuser
password = dbpassword
database = use_this_database
`

const ast = parseText(ini)
const text = decode(ast)

// Result:
//
// {
//   "scope": "global",
//   "database": {
//     "user": "dbuser",
//     "password": "dbpassword",
//     "database": "use_this_database"
//   }
// }

API

See also the TypeScript types.

decode(file: object): object

Decodes an AST object to a JSON object with the data.

Package Sidebar

Install

npm i fast-ini-decoder

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

14.3 kB

Total Files

14

Last publish

Collaborators

  • prantlf