Skip to main content
Home

Built and signed on GitHub Actions

A parser that allows editing while maintaining the structure of ini.

This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
It is unknown whether this package works with Browsers
JSR Score
100%
Published
a year ago (0.0.2)

perfect-ini-parser

A parser that allows editing while maintaining the structure of ini.

  • support comment (';' '#')
  • support CRLF
  • support order retenation ( minimal change)
Warning

  • unsupport inline comment
  • unsupport multi-line
  • unsupport quote
  • unsupport section nest

Usage

import { parse } from "jsr:@gunseikpaseri/perfect-ini-parser";

const iniFile = `[hoge]
; comment
fuga=piyo
`;

const parsed = parse(iniFile);

parsed.edit("hoge", "fuga", "momo");

const editedIni = parsed.stringify();

console.log(editedIni);
// [hoge]
// ; comment
// fuga=momo
Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@gunseikpaseri/perfect-ini-parser

Import symbol

import * as perfect_ini_parser from "@gunseikpaseri/perfect-ini-parser";
or

Import directly with a jsr specifier

import * as perfect_ini_parser from "jsr:@gunseikpaseri/perfect-ini-parser";

Add Package

pnpm i jsr:@gunseikpaseri/perfect-ini-parser
or (using pnpm 10.8 or older)
pnpm dlx jsr add @gunseikpaseri/perfect-ini-parser

Import symbol

import * as perfect_ini_parser from "@gunseikpaseri/perfect-ini-parser";

Add Package

yarn add jsr:@gunseikpaseri/perfect-ini-parser
or (using Yarn 4.8 or older)
yarn dlx jsr add @gunseikpaseri/perfect-ini-parser

Import symbol

import * as perfect_ini_parser from "@gunseikpaseri/perfect-ini-parser";

Add Package

vlt install jsr:@gunseikpaseri/perfect-ini-parser

Import symbol

import * as perfect_ini_parser from "@gunseikpaseri/perfect-ini-parser";

Add Package

npx jsr add @gunseikpaseri/perfect-ini-parser

Import symbol

import * as perfect_ini_parser from "@gunseikpaseri/perfect-ini-parser";

Add Package

bunx jsr add @gunseikpaseri/perfect-ini-parser

Import symbol

import * as perfect_ini_parser from "@gunseikpaseri/perfect-ini-parser";