Skip to main content

@std/ini@0.225.2
Built and signed on GitHub Actions

UNSTABLE: Parsing and serializing of INI files

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
5 months ago (0.225.2)
interface Comments

Manages comments within the INI file.

Methods

clear(): void

Clear all comments in the INI.

Delete a comment at a specific line in the INI.

Delete a comment before a global key in the INI.

Delete a comment before a section key in the INI.

Delete a comment before a section line in the INI.

getAtLine(line: number): string | undefined

Get the comment text at a specific line in the INI.

getAtKey(key: string): string | undefined

Get the comment text before a global key in the INI.

getAtKey(
section: string,
key: string,
): string | undefined

Get the comment text before a section key in the INI.

getAtSection(section: string): string | undefined

Get the comment text before a section line in the INI.

Set a comment at a specific line in the INI.

Set a comment before a global key in the INI.

setAtKey(
section: string,
key: string,
text: string,
): Comments

Set a comment before a section key in the INI.

Set a comment before a section line in the INI.

Add Package

deno add jsr:@std/ini

Import symbol

import { type Comments } from "@std/ini/ini-map";

---- OR ----

Import directly with a jsr specifier

import { type Comments } from "jsr:@std/ini/ini-map";

Add Package

npx jsr add @std/ini

Import symbol

import { type Comments } from "@std/ini/ini-map";

Add Package

yarn dlx jsr add @std/ini

Import symbol

import { type Comments } from "@std/ini/ini-map";

Add Package

pnpm dlx jsr add @std/ini

Import symbol

import { type Comments } from "@std/ini/ini-map";

Add Package

bunx jsr add @std/ini

Import symbol

import { type Comments } from "@std/ini/ini-map";