1
/**
2
 * Remove quotes around given string.
3
 *
4
 * @param {string} string
5
 * @returns {string}
6
 */
7 0
export function unquote(string: string): string {
8 0
	return string.replace(/^['"]|['"]$/g, '')
9
}
10

11
/**
12
 * Show starting and ending whitespace around given string.
13
 *
14
 * @param {string} string
15
 * @returns {string}
16
 */
17 0
export function showSpaces(string: string): string {
18 0
	return string.replace(/^\s|\s$/g, '␣')
19
}

Read our documentation on viewing source code .

Loading