Module

std/ini/mod.ts>Comments

The Deno Standard Library
Latest
interface Comments
import { type Comments } from "https://dotland.deno.dev/std@0.224.0/ini/mod.ts";

Methods

clear(): void

Clear all comments in the INI.

deleteAtLine(line: number): boolean

Delete a comment at a specific line in the INI.

deleteAtKey(key: string): boolean

Delete a comment before a global key in the INI.

deleteAtKey(section: string, key: string): boolean

Delete a comment before a section key in the INI.

deleteAtSection(section: string): boolean

Delete a comment before a section line in the INI.

getAtLine(line: number): string | undefined

Get a comment at a specific line in the INI.

getAtKey(key: string): string | undefined

Get a comment before a global key in the INI.

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

Get a comment before a section key in the INI.

getAtSection(section: string): string | undefined

Get a comment before a section line in the INI.

setAtLine(line: number, text: string): Comments

Set a comment at a specific line in the INI.

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

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.

setAtSection(section: string, text: string): Comments

Set a comment before a section line in the INI.