diff options
Diffstat (limited to 'packages/astro-parser/src/utils/trim.ts')
-rw-r--r-- | packages/astro-parser/src/utils/trim.ts | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/packages/astro-parser/src/utils/trim.ts b/packages/astro-parser/src/utils/trim.ts deleted file mode 100644 index 480cc99a8..000000000 --- a/packages/astro-parser/src/utils/trim.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { whitespace } from './patterns.js'; - -/** Trim whitespace from start of string */ -export function trim_start(str: string) { - let i = 0; - while (whitespace.test(str[i])) i += 1; - - return str.slice(i); -} - -/** Trim whitespace from end of string */ -export function trim_end(str: string) { - let i = str.length; - while (whitespace.test(str[i - 1])) i -= 1; - - return str.slice(0, i); -} |