@truto/truto-jsonata 1.0.3 → 1.0.5

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
@@ -1459,6 +1459,43 @@ This is a **bold** statement.
1459
1459
 
1460
1460
  </details>
1461
1461
 
1462
+ <details>
1463
+ <summary>convertMarkdownToHtml(markdownString)</summary>
1464
+
1465
+ Converts Markdown content to HTML format.
1466
+
1467
+ **Example:**
1468
+
1469
+ ```javascript
1470
+ import trutoJsonata from '@truto/truto-jsonata';
1471
+
1472
+ // Define an Markdown string to convert
1473
+ const markdownContent = `
1474
+ # Welcome to Markdown
1475
+ This is a **bold** statement.
1476
+ - Item 1
1477
+ - Item 2
1478
+ `;
1479
+
1480
+ // Use convertMarkdownToHtml to transform Markdown into HTML
1481
+ const expression = trutoJsonata("$convertMarkdownToHtml(markdownContent)");
1482
+ expression.evaluate({ markdownContent }).then(result => { console.log(result); });
1483
+
1484
+ /*
1485
+ Output:
1486
+
1487
+ <h1>Welcome to Markdown</h1>
1488
+ <p>This is a <strong>bold</strong> statement.</p>
1489
+ <ul>
1490
+ <li>Item 1</li>
1491
+ <li>Item 2</li>
1492
+ </ul>
1493
+
1494
+ */
1495
+ ```
1496
+
1497
+ </details>
1498
+
1462
1499
  ---
1463
1500
 
1464
1501
  ### Array and Object Utilities (Lodash Enhancements)
package/dist/main.cjs CHANGED
@@ -1334,6 +1334,13 @@ var $77081a2d6d46cd50$export$2e2bcd8739ae039 = $77081a2d6d46cd50$var$base64decod
1334
1334
 
1335
1335
 
1336
1336
 
1337
+
1338
+ async function $2c639152271462a6$var$convertMarkdownToHtml(markdown) {
1339
+ return (0, $dxT2C$marked.marked).parse(markdown);
1340
+ }
1341
+ var $2c639152271462a6$export$2e2bcd8739ae039 = $2c639152271462a6$var$convertMarkdownToHtml;
1342
+
1343
+
1337
1344
  function $af351c41b7fd6f79$export$2e2bcd8739ae039(expression) {
1338
1345
  expression.registerFunction("dtFromIso", (0, $bab42b5e4be720d3$export$2e2bcd8739ae039));
1339
1346
  expression.registerFunction("base64decode", (0, $77081a2d6d46cd50$export$2e2bcd8739ae039));
@@ -1364,6 +1371,7 @@ function $af351c41b7fd6f79$export$2e2bcd8739ae039(expression) {
1364
1371
  expression.registerFunction("sortNodes", (0, $0a764cc1e9fed37c$export$2e2bcd8739ae039));
1365
1372
  expression.registerFunction("blob", (0, $5e0c34680d37ee90$export$2e2bcd8739ae039));
1366
1373
  expression.registerFunction("convertHtmlToMarkdown", (0, $59b0e4ac45b59e5b$export$2e2bcd8739ae039));
1374
+ expression.registerFunction("convertMarkdownToHtml", (0, $2c639152271462a6$export$2e2bcd8739ae039));
1367
1375
  expression.registerFunction("digest", (0, $1cf667e257c1904d$export$2e2bcd8739ae039));
1368
1376
  expression.registerFunction("sign", (0, $256af523deaf5315$export$2e2bcd8739ae039));
1369
1377
  expression.registerFunction("xmlToJs", (0, $d08a44d57b1bb13e$export$2e2bcd8739ae039));