[README] Fix JS example code import

This commit is contained in:
Wilson Lin 2023-01-26 15:38:35 +11:00
parent 019909b9f2
commit c0f7ac99e1
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ TypeScript definitions are available.
```ts
import { Buffer } from "node:buffer";
import * as minifyHtml from "@minify-html/node";
import minifyHtml from "@minify-html/node";
// Or `const minifyHtml = require("@minify-html/node")` if not using TS/ESM.
const minified = minifyHtml.minify(Buffer.from("<p> Hello, world! </p>"), { keep_spaces_between_attributes: true, keep_comments: true });