mirror of https://github.com/sveltejs/svelte
parent
5a0185a5bb
commit
003041715e
@ -1,5 +1,5 @@
|
||||
export const whitespace = /[ \t\r\n]/;
|
||||
export const startWhitespace = /^[ \t\r\n]*/;
|
||||
export const endWhitespace = /[ \t\r\n]*$/;
|
||||
export const start_whitespace = /^[ \t\r\n]*/;
|
||||
export const end_whitespace = /[ \t\r\n]*$/;
|
||||
|
||||
export const dimensions = /^(?:offset|client)(?:Width|Height)$/;
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { startWhitespace, endWhitespace } from './patterns';
|
||||
import { start_whitespace, end_whitespace } from './patterns';
|
||||
|
||||
export function trim_start(str: string) {
|
||||
return str.replace(startWhitespace, '');
|
||||
return str.replace(start_whitespace, '');
|
||||
}
|
||||
|
||||
export function trim_end(str: string) {
|
||||
return str.replace(endWhitespace, '');
|
||||
return str.replace(end_whitespace, '');
|
||||
}
|
||||
|
||||
Loading…
Reference in new issue