Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 |
/**
|
|
2 |
* Remove quotes around given string.
|
|
3 |
*
|
|
4 |
* @param {string} string
|
|
5 |
* @returns {string}
|
|
6 |
*/
|
|
7 |
export function unquote(string: string): string { |
|
8 |
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 |
export function showSpaces(string: string): string { |
|
18 |
return string.replace(/^\s|\s$/g, '␣') |
|
19 |
}
|
Read our documentation on viewing source code .