Skip to content

Commit a71879f

Browse files
feat: add files
0 parents  commit a71879f

File tree

8 files changed

+350
-0
lines changed

8 files changed

+350
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Menglin "Mark" Xu <mark@remarkablemark.org>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# html-react-parser-esm-demo
2+
3+
html-react-parser ESM demo

index.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import parse from 'html-react-parser';
2+
3+
parse('');

index.mts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import parse, { attributesToProps, domToReact, htmlToDOM } from 'html-react-parser';
2+
import type {
3+
Comment,
4+
DOMNode,
5+
Element,
6+
HTMLReactParserOptions,
7+
ProcessingInstruction,
8+
Text,
9+
} from 'html-react-parser';
10+
11+
let comment: Comment;
12+
let domNode: DOMNode;
13+
let element: Element;
14+
let options: HTMLReactParserOptions;
15+
let processingInstruction: ProcessingInstruction;
16+
let text: Text;
17+
18+
const output = parse('');
19+
attributesToProps();
20+
domToReact([]);
21+
htmlToDOM('');

package-lock.json

Lines changed: 184 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"private": true,
3+
"dependencies": {
4+
"html-react-parser": "^5.1.4",
5+
"typescript": "^5.3.3"
6+
}
7+
}

0 commit comments

Comments
 (0)