summaryrefslogtreecommitdiff
path: root/packages/astro-parser/src/utils/trim.ts
diff options
context:
space:
mode:
authorGravatar Carter Snook <cartersnook04@gmail.com> 2021-07-17 14:39:11 -0500
committerGravatar GitHub <noreply@github.com> 2021-07-17 15:39:11 -0400
commitb8a90b1e7dd1f098ff855301cf1b09a324759ce4 (patch)
tree527e8e09b34fd1c0850e5eff84e34195dcbf99a4 /packages/astro-parser/src/utils/trim.ts
parent304e1c65e67b6fa8feccf9bd998dfd996669bf1d (diff)
downloadastro-b8a90b1e7dd1f098ff855301cf1b09a324759ce4.tar.gz
astro-b8a90b1e7dd1f098ff855301cf1b09a324759ce4.tar.zst
astro-b8a90b1e7dd1f098ff855301cf1b09a324759ce4.zip
feat(parser): remove trim utils (#728)
Diffstat (limited to 'packages/astro-parser/src/utils/trim.ts')
-rw-r--r--packages/astro-parser/src/utils/trim.ts17
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);
-}