1
1
# hast-util-to-jsx-runtime
2
2
3
- [ ![ Build] [ build-badge ]] [ build ]
4
- [ ![ Coverage] [ coverage-badge ]] [ coverage ]
5
- [ ![ Downloads] [ downloads-badge ]] [ downloads ]
6
- [ ![ Size] [ size-badge ]] [ size ]
7
- [ ![ Sponsors] [ sponsors-badge ]] [ collective ]
8
- [ ![ Backers] [ backers-badge ]] [ collective ]
9
- [ ![ Chat] [ chat-badge ]] [ chat ]
3
+ [ ![ Build] [ badge-build-image ]] [ badge-build-url ]
4
+ [ ![ Coverage] [ badge-coverage-image ]] [ badge-coverage-url ]
5
+ [ ![ Downloads] [ badge-downloads-image ]] [ badge-downloads-url ]
6
+ [ ![ Size] [ badge-size-image ]] [ badge-size-url ]
10
7
11
8
hast utility to transform a tree to preact, react, solid, svelte, vue, etc.,
12
9
with an automatic JSX runtime.
@@ -49,9 +46,9 @@ with an automatic JSX runtime.
49
46
50
47
## What is this?
51
48
52
- This package is a utility that takes a [ hast] [ ] tree and an
53
- [ automatic JSX runtime] [ jsx-runtime ] and turns the tree into anything you
54
- wish.
49
+ This package is a utility that takes a [ hast] [ github-hast ] tree and an
50
+ [ automatic JSX runtime] [ reactjs- jsx-runtime] and turns the tree into anything
51
+ you wish.
55
52
56
53
## When should I use this?
57
54
@@ -66,8 +63,8 @@ development, and have guaranteed support for fragments.
66
63
67
64
## Install
68
65
69
- This package is [ ESM only] [ esm ] .
70
- In Node.js (version 16+), install with [ npm] [ ] :
66
+ This package is [ ESM only] [ github-gist- esm] .
67
+ In Node.js (version 16+), install with [ npm] [ npmjs-install ] :
71
68
72
69
``` sh
73
70
npm install hast-util-to-jsx-runtime
@@ -152,7 +149,7 @@ automatic JSX runtime.
152
149
153
150
##### Parameters
154
151
155
- * ` tree ` ([ ` Node ` ][node ])
152
+ * ` tree ` ([ ` Node ` ][github-hast-nodes ])
156
153
— tree to transform
157
154
* ` options ` ([ ` Options ` ][api-options], required)
158
155
— configuration
@@ -722,115 +719,108 @@ This means we try to keep the current release line,
722
719
## Security
723
720
724
721
Be careful with user input in your hast tree.
725
- Use [ ` hast-util-santize ` ] [ hast-util-sanitize ] to make hast trees safe.
722
+ Use [ ` hast-util-santize ` ] [ github- hast-util-sanitize] to make hast trees safe.
726
723
727
724
## Related
728
725
729
726
* [ ` hastscript ` ] ( https://github.com/syntax-tree/hastscript )
730
727
— build hast trees
731
728
* [ ` hast-util-to-html ` ] ( https://github.com/syntax-tree/hast-util-to-html )
732
729
— serialize hast as HTML
733
- * [ ` hast-util-sanitize ` ] ( https:// github.com/syntax-tree/ hast-util-sanitize)
730
+ * [ ` hast-util-sanitize ` ] [ github- hast-util-sanitize ]
734
731
— sanitize hast
735
732
736
733
## Contribute
737
734
738
- See [ ` contributing.md ` ] [ contributing ] in [ ` syntax-tree/.github ` ] [ health ] for
739
- ways to get started.
740
- See [ ` support.md ` ] [ support ] for ways to get help.
735
+ See [ ` contributing.md ` ] [ health-contributing ]
736
+ in
737
+ [ ` syntax-tree/.github ` ] [ health ]
738
+ for ways to get started.
739
+ See [ ` support.md ` ] [ health-support ] for ways to get help.
741
740
742
- This project has a [ code of conduct] [ coc ] .
743
- By interacting with this repository, organization, or community you agree to
744
- abide by its terms.
741
+ This project has a [ code of conduct] [ health-coc ] .
742
+ By interacting with this repository,
743
+ organization,
744
+ or community you agree to abide by its terms.
745
745
746
746
## License
747
747
748
- [ MIT] [ license ] © [ Titus Wormer] [ author ]
748
+ [ MIT] [ file- license] © [ Titus Wormer] [ wooorm ]
749
749
750
750
<!-- Definitions -->
751
751
752
- [ build-badge ] : https://github.com/syntax-tree/hast-util-to-jsx-runtime/workflows/main/badge.svg
753
-
754
- [ build ] : https://github.com/syntax-tree/hast-util-to-jsx-runtime/actions
755
-
756
- [ coverage-badge ] : https://img.shields.io/codecov/c/github/syntax-tree/hast-util-to-jsx-runtime.svg
757
-
758
- [ coverage ] : https://codecov.io/github/syntax-tree/hast-util-to-jsx-runtime
759
-
760
- [ downloads-badge ] : https://img.shields.io/npm/dm/hast-util-to-jsx-runtime.svg
761
-
762
- [ downloads ] : https://www.npmjs.com/package/hast-util-to-jsx-runtime
752
+ [ api-components ] : #components
763
753
764
- [ size-badge ] : https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-to-jsx-runtime
754
+ [ api-create-evaluater ] : #createevaluater
765
755
766
- [ size ] : https://bundlejs.com/?q=hast-util-to-jsx-runtime
756
+ [ api-element-attribute-name-case ] : #elementattributenamecase
767
757
768
- [ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
758
+ [ api-evaluate-expression ] : #evaluateexpression
769
759
770
- [ backers-badge ] : https://opencollective.com/unified/backers/badge.svg
760
+ [ api-evaluate-program ] : #evaluateprogram
771
761
772
- [ collective ] : https://opencollective.com/unified
762
+ [ api-evaluater ] : #evaluater
773
763
774
- [ chat-badge ] : https://img.shields.io/badge/chat-discussions-success.svg
764
+ [ api-extra-props ] : #extraprops
775
765
776
- [ chat ] : https://github.com/syntax-tree/unist/discussions
766
+ [ api-fragment ] : #fragment
777
767
778
- [ npm ] : https://docs.npmjs.com/cli/install
768
+ [ api-jsx ] : #jsx
779
769
780
- [ esm ] : https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
770
+ [ api-jsx-dev ] : #jsxdev
781
771
782
- [ esmsh ] : https://esm.sh
772
+ [ api-options ] : #options
783
773
784
- [ typescript ] : https://www.typescriptlang.org
774
+ [ api-props ] : #props
785
775
786
- [ license ] : license
776
+ [ api-source ] : #source
787
777
788
- [ author ] : https://wooorm.com
778
+ [ api-space ] : #space
789
779
790
- [ health ] : https://github.com/syntax-tree/.github
780
+ [ api-style-property-name-case ] : #stylepropertynamecase
791
781
792
- [ contributing ] : https://github.com/syntax-tree/.github/blob/main/contributing.md
782
+ [ api-to-jsx-runtime ] : #tojsxruntimetree-options
793
783
794
- [ support ] : https://github.com/syntax-tree/.github/blob /main/support.md
784
+ [ badge-build-image ] : https://github.com/syntax-tree/hast-util-to-jsx-runtime/workflows /main/badge.svg
795
785
796
- [ coc ] : https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
786
+ [ badge-build-url ] : https://github.com/syntax-tree/hast-util-to-jsx-runtime/actions
797
787
798
- [ hast ] : https://github.com/ syntax-tree/hast
788
+ [ badge-coverage-image ] : https://img.shields.io/codecov/c/github/ syntax-tree/hast-util-to-jsx-runtime.svg
799
789
800
- [ node ] : https://github.com/ syntax-tree/hast#nodes
790
+ [ badge-coverage-url ] : https://codecov.io/github/ syntax-tree/hast-util-to-jsx-runtime
801
791
802
- [ hast-util-sanitize ] : https://github.com/syntax-tree/ hast-util-sanitize
792
+ [ badge-downloads-image ] : https://img.shields.io/npm/dm/ hast-util-to-jsx-runtime.svg
803
793
804
- [ jsx-runtime ] : https://reactjs.org/blog/2020/09/22/introducing-the-new -jsx-transform.html
794
+ [ badge-downloads-url ] : https://www.npmjs.com/package/hast-util-to -jsx-runtime
805
795
806
- [ api-to-jsx-runtime ] : #tojsxruntimetree-options
796
+ [ badge-size-image ] : https://img.shields.io/bundlejs/size/hast-util-to-jsx-runtime
807
797
808
- [ api-components ] : #components
798
+ [ badge-size-url ] : https://bundlejs.com/?q=hast-util-to-jsx-runtime
809
799
810
- [ api-create-evaluater ] : #createevaluater
800
+ [ esmsh ] : https://esm.sh
811
801
812
- [ api-element-attribute-name-case ] : #elementattributenamecase
802
+ [ file-license ] : license
813
803
814
- [ api-evaluate-expression ] : #evaluateexpression
804
+ [ github-gist-esm ] : https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
815
805
816
- [ api-evaluate-program ] : #evaluateprogram
806
+ [ github-hast ] : https://github.com/syntax-tree/hast
817
807
818
- [ api-evaluater ] : #evaluater
808
+ [ github-hast-nodes ] : https://github.com/syntax-tree/hast#nodes
819
809
820
- [ api-extra-props ] : #extraprops
810
+ [ github-hast-util-sanitize ] : https://github.com/syntax-tree/hast-util-sanitize
821
811
822
- [ api-fragment ] : #fragment
812
+ [ health ] : https://github.com/syntax-tree/.github
823
813
824
- [ api-jsx ] : #jsx
814
+ [ health-coc ] : https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
825
815
826
- [ api-jsx-dev ] : #jsxdev
816
+ [ health-contributing ] : https://github.com/syntax-tree/.github/blob/main/contributing.md
827
817
828
- [ api-options ] : #options
818
+ [ health-support ] : https://github.com/syntax-tree/.github/blob/main/support.md
829
819
830
- [ api-props ] : #props
820
+ [ npmjs-install ] : https://docs.npmjs.com/cli/install
831
821
832
- [ api-source ] : #source
822
+ [ reactjs-jsx-runtime ] : https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html
833
823
834
- [ api-space ] : #space
824
+ [ typescript ] : https://www.typescriptlang.org
835
825
836
- [ api-style-property-name-case ] : #stylepropertynamecase
826
+ [ wooorm ] : https://wooorm.com
0 commit comments