Skip to content

refactor(ini): remove IniMap #6515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1a295e6
initial commit
timreichen Mar 25, 2025
b4eff20
initial commit
timreichen Mar 25, 2025
e47bee4
initial commit
timreichen Mar 25, 2025
079e37c
Merge branch 'main' into ini-simplify-stringify
timreichen Mar 25, 2025
048a64b
Merge branch 'main' into ini-simplify-parse
timreichen Mar 25, 2025
679d407
update
timreichen Mar 25, 2025
7ff56ed
update
timreichen Mar 25, 2025
32dc8c0
update
timreichen Mar 25, 2025
dbd5ede
update
timreichen Mar 25, 2025
525b45b
Merge branch 'ini-simplify-stringify'
timreichen Mar 25, 2025
2da6004
initial commit
timreichen Mar 25, 2025
cd057d1
add tests
timreichen Mar 25, 2025
03e6f13
Merge branch 'main' into ini-simplify-stringify
timreichen Mar 26, 2025
6d04142
Merge branch 'main' into ini-remove-IniMap
timreichen Mar 26, 2025
2afe30e
Merge branch 'main' into ini-simplify-stringify
timreichen Mar 27, 2025
173112a
update
timreichen Mar 27, 2025
b587683
Merge branch 'main' into ini-remove-IniMap
timreichen Mar 27, 2025
7802782
Update parse_test.ts
timreichen Mar 27, 2025
40d0dc9
Merge branch 'ini-simplify-stringify' into ini-remove-IniMap
timreichen Mar 27, 2025
9242de5
Merge branch 'main' into ini-remove-IniMap
timreichen Mar 30, 2025
5e70e2c
Merge branch 'main' into ini-remove-IniMap
timreichen Apr 1, 2025
a06285d
Merge branch 'main' into ini-remove-IniMap
timreichen Apr 1, 2025
8a88ebf
Merge branch 'main' into ini-remove-IniMap
timreichen Apr 3, 2025
d65cbf3
Merge branch 'main' into ini-remove-IniMap
timreichen Apr 7, 2025
3a48484
update
timreichen Apr 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
311 changes: 0 additions & 311 deletions ini/_ini_map.ts

This file was deleted.

8 changes: 6 additions & 2 deletions ini/parse.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
// Copyright 2018-2025 the Deno authors. MIT license.
// This module is browser compatible.

import type { ReviverFunction } from "./_ini_map.ts";
export type { ReviverFunction };
/** Function for replacing INI values with JavaScript values. */
export type ReviverFunction = (
key: string,
value: string,
section?: string,
) => unknown;

const SECTION_REGEXP = /^\[(?<name>.*\S.*)]$/;
const KEY_VALUE_REGEXP = /^(?<key>.*?)\s*=\s*(?<value>.*?)$/;
Expand Down
10 changes: 7 additions & 3 deletions ini/stringify.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
// Copyright 2018-2025 the Deno authors. MIT license.
// This module is browser compatible.

import type { ReplacerFunction } from "./_ini_map.ts";
/** Function for replacing JavaScript values with INI string values. */
export type ReplacerFunction = (
key: string,
// deno-lint-ignore no-explicit-any
value: any,
section?: string,
) => string;

/** Options for {@linkcode stringify}. */
export interface StringifyOptions {
Expand All @@ -26,8 +32,6 @@ export interface StringifyOptions {
replacer?: ReplacerFunction;
}

export type { ReplacerFunction };

function isPlainObject(object: unknown): object is object {
return Object.prototype.toString.call(object) === "[object Object]";
}
Expand Down
Loading