import { dedent } from "https://deno.land/x/ayonli_jsext@v0.9.72/string/index.ts";
Removes extra indentation from the string.
NOTE: This function also removes leading and trailing newlines.
Examples
Example 1
Example 1
import { dedent } from "@ayonli/jsext/string";
class MyClass {
print() {
console.log(dedent(`
create table student(
id int primary key,
name text
)
`));
}
}
new MyClass().print();
// Output:
// create table student(
// id int primary key,
// name text
// )