indent.js
indent.js copied to clipboard
indent.html does not exist when using es modules
running this in node 14:
import indent from "indent";
export default async function processfile(data) {
return indent.html(data);
}
errors out going
(node:6724) UnhandledPromiseRejectionWarning: TypeError: indent.html is not a function
at ....
So that's literally useless? =(
You need to import
import { indent} from "indent";
@zebzhao can you update the README with that? Right now it's telling folks to use the wrong import:

This appears to be fixed in that import indent from 'indent.js' works and import { indent } … results in undefined now.