Skip to content

Commit 3aab063

Browse files
committed
Updated JSDoc
1 parent c90891a commit 3aab063

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

src/format/trim_characters.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import trimCharactersStart from "./trim_characters_start.ts";
55
* This function is similar to the standard `String.prototype.trim()` function. With this function, several characters
66
* can be specified as a string which are then trimmed at the start and end of the `inputString`.
77
*
8+
* @example
9+
* ```
10+
* console.log(trimCharacters('1abc123', '3c21'))
11+
* // ab
12+
* ```
813
* @param inputString The input string to trim the start and end
914
* @param characters The characters to trim
1015
* @returns The trimmed input string
@@ -13,5 +18,5 @@ export default function trimCharacters(
1318
inputString : string,
1419
characters : string
1520
) : string {
16-
return trimCharactersStart(trimCharactersEnd(inputString, characters), characters)
21+
return trimCharactersStart(trimCharactersEnd(inputString, characters), characters);
1722
}

src/format/trim_characters_end.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
/**
22
* This function is similar to the standard `String.prototype.trimEnd()` function. With this function, several characters
33
* can be specified as a string which are then trimmed at the end of the `inputString`.
4-
*
4+
*
5+
* @example
6+
* ```
7+
* console.log(trimCharactersEnd('1abc123', '3c12'))
8+
* // 1ab
9+
* ```
510
* @param inputString The input string to trim the end
611
* @param characters The characters to trim
712
* @returns The trimmed input string

src/format/trim_characters_start.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
/**
22
* This function is similar to the standard `String.prototype.trimStart()` function. With this function, several
33
* characters can be specified as a string which are then trimmed at the start of the `inputString`.
4-
*
4+
*
5+
* @example
6+
* ```
7+
* console.log(trimCharactersStart('1abc123', 'b1a'))
8+
* // c123
9+
* ```
510
* @param inputString The input string to trim the start
611
* @param characters The characters to trim
712
* @returns The trimmed input string

0 commit comments

Comments
 (0)