Skip to content

Commit 3f4bed4

Browse files
committed
chore: added code docs
1 parent 5438dd3 commit 3f4bed4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/properties.ts

+9
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ export function* list(config: Properties): Generator<KeyValuePair> {
8484
/**
8585
* Finds a value for the given key.
8686
*
87+
* Note that this method has O(n) complexity. If you want to read the file
88+
* effectively, use `toObject` or `toMap` functions.
89+
*
8790
* @param config Java properties set.
8891
* @param key Key name.
8992
* @return Found value, or undefined. Value is properly unescaped.
@@ -170,6 +173,12 @@ export const set = (
170173
export const remove = (config: Properties, key: string): void =>
171174
set(config, key, undefined)
172175

176+
/**
177+
* Find value indices.
178+
*
179+
* @param lines Lines array.
180+
* @param key Key to be found.
181+
*/
173182
const findValue = (
174183
lines: string[],
175184
key: string

0 commit comments

Comments
 (0)