diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index bccddb7..39d259d 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/benchmark/benchmark.mjs b/benchmark/benchmark.mjs index 407422d..85349f4 100644 --- a/benchmark/benchmark.mjs +++ b/benchmark/benchmark.mjs @@ -1,10 +1,10 @@ -import cheerio from "./cheerio.mjs"; import niddle from "./niddle.mjs"; +import cheerioParse5 from "./cheerio-parse5.mjs"; import cheerioHtmlParser2 from "./cheerio-htmlparser2.mjs"; async function main() { await niddle(); - await cheerio(); + await cheerioParse5(); await cheerioHtmlParser2(); } diff --git a/benchmark/cheerio.mjs b/benchmark/cheerio-parse5.mjs similarity index 94% rename from benchmark/cheerio.mjs rename to benchmark/cheerio-parse5.mjs index 9ecfdf6..c900a45 100644 --- a/benchmark/cheerio.mjs +++ b/benchmark/cheerio-parse5.mjs @@ -14,7 +14,7 @@ export default function cheerio() { bench.on("result", function (stat) { console.log( - "cheerio :" + + "cheerio-parse5 :" + stat.mean().toPrecision(6) + " ms/file ± " + stat.sd().toPrecision(6), diff --git a/index.d.ts b/index.d.ts index f631c49..e7fc0a6 100644 --- a/index.d.ts +++ b/index.d.ts @@ -91,10 +91,3 @@ export declare class NodeRepr { /** Clone this node to a new instance, including its all descendants. */ cloneRecursive(): NodeRepr } -export declare interface NodeRepr { - /** The node object, cann't be instantiated in javascript. So call the constructor will throw an error */ - constructor(): void; - select(selectors: "html"): NodeRepr; - select(selectors: "head"): NodeRepr; - select(selectors: "body"): NodeRepr; -}