mdream 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -22,12 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
- 🧠 Content Extraction: [Readability.js]() scoring heuristics for [~50% fewer tokens*]() and improved accuracy.
|
|
24
24
|
- 🔍 GitHub Flavored Markdown: Frontmatter, Nested & HTML markup support.
|
|
25
|
-
- Tailwind CSS: Converts Tailwind CSS classes to Markdown for better readability.
|
|
26
25
|
|
|
27
26
|
**Ultra Performant**
|
|
28
27
|
- 🚀 Convert 1.4MB of HTML in [~50ms*]() with advanced streaming support, including content-based buffering.
|
|
29
28
|
- ⚡ 5kB gzip, zero dependencies.
|
|
30
|
-
- Streaming support
|
|
31
29
|
|
|
32
30
|
**Adaptable**
|
|
33
31
|
|
package/dist/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { Readable } from 'node:stream';
|
|
|
2
2
|
import { cac } from 'cac';
|
|
3
3
|
import { f as frontmatterPlugin } from './shared/mdream.CNrwlePY.mjs';
|
|
4
4
|
import { r as readabilityPlugin } from './shared/mdream.VU-fHLcf.mjs';
|
|
5
|
-
import { s as streamHtmlToMarkdown } from './shared/mdream.
|
|
5
|
+
import { s as streamHtmlToMarkdown } from './shared/mdream.DZEl9tTZ.mjs';
|
|
6
6
|
import './shared/mdream.C8Xgmr_a.mjs';
|
|
7
7
|
|
|
8
8
|
async function streamingConvert(options = {}) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as processPartialHTMLToMarkdown } from './shared/mdream.
|
|
2
|
-
export { s as streamHtmlToMarkdown } from './shared/mdream.
|
|
1
|
+
import { p as processPartialHTMLToMarkdown } from './shared/mdream.DZEl9tTZ.mjs';
|
|
2
|
+
export { s as streamHtmlToMarkdown } from './shared/mdream.DZEl9tTZ.mjs';
|
|
3
3
|
export { T as TagIdMap } from './shared/mdream.C8Xgmr_a.mjs';
|
|
4
4
|
|
|
5
5
|
function htmlToMarkdown(html, options = {}) {
|
|
@@ -1402,13 +1402,15 @@ function parseAttributes(attrStr) {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
i++;
|
|
1404
1404
|
}
|
|
1405
|
-
if (
|
|
1406
|
-
if (
|
|
1405
|
+
if (state === QUOTED_VALUE || state === UNQUOTED_VALUE) {
|
|
1406
|
+
if (name) {
|
|
1407
1407
|
result[name] = attrStr.substring(valueStart, i);
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1408
|
+
}
|
|
1409
|
+
} else if (state === NAME || state === AFTER_NAME || state === BEFORE_VALUE) {
|
|
1410
|
+
nameEnd = nameEnd || i;
|
|
1411
|
+
const currentName = attrStr.substring(nameStart, nameEnd).toLowerCase();
|
|
1412
|
+
if (currentName) {
|
|
1413
|
+
result[currentName] = "";
|
|
1412
1414
|
}
|
|
1413
1415
|
}
|
|
1414
1416
|
return result;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdream",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.8",
|
|
5
5
|
"description": "Ultra-performant JavaScript HTML to Markdown converter optimized for LLMs.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@antfu/eslint-config": "^4.16.1",
|
|
33
|
-
"@types/node": "^22.15.
|
|
33
|
+
"@types/node": "^22.15.34",
|
|
34
34
|
"bumpp": "^10.2.0",
|
|
35
35
|
"crawlee": "^3.13.8",
|
|
36
|
-
"eslint": "^9.
|
|
36
|
+
"eslint": "^9.30.0",
|
|
37
37
|
"llm-cost": "^1.0.5",
|
|
38
38
|
"playwright": "^1.53.1",
|
|
39
39
|
"typescript": "5.8.3",
|