{"_id":"recma-jsx","_rev":"3912658","name":"recma-jsx","description":"recma plugin to add support for parsing and serializing JSX","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"},{"name":"remcohaszing","email":""},{"name":"timneutkens","email":"tim@timneutkens.nl"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"time":{"modified":"2025-09-01T01:15:40.000Z","created":"2024-10-18T11:38:35.021Z","1.0.1":"2025-07-28T18:18:32.494Z","1.0.0":"2024-10-18T11:38:35.021Z"},"users":{},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"repository":{"type":"git","url":"git+https://github.com/mdx-js/recma.git#main"},"versions":{"1.0.1":{"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"bugs":{"url":"https://github.com/mdx-js/recma/issues"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"description":"recma plugin to add support for parsing and serializing JSX","dependencies":{"acorn-jsx":"^5.0.0","estree-util-to-js":"^2.0.0","recma-parse":"^1.0.0","recma-stringify":"^1.0.0","unified":"^11.0.0"},"peerDependencies":{"acorn":"^6.0.0 || ^7.0.0 || ^8.0.0"},"exports":"./index.js","funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"homepage":"https://github.com/mdx-js/recma","keywords":["abstract","ast","compile","javascript","jsx","plugin","recma-plugin","recma","syntax","tree","unified"],"license":"MIT","name":"recma-jsx","repository":{"type":"git","url":"git+https://github.com/mdx-js/recma.git#main"},"scripts":{},"sideEffects":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"type":"module","version":"1.0.1","_id":"recma-jsx@1.0.1","gitHead":"c1ae4a48382f446e23755886d1d3a504017d7191","types":"./index.d.ts","_nodeVersion":"23.9.0","_npmVersion":"11.4.2","dist":{"shasum":"58e718f45e2102ed0bf2fa994f05b70d76801a1a","size":3747,"noattachment":false,"key":"/recma-jsx/-/recma-jsx-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/recma-jsx/download/recma-jsx-1.0.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"},{"name":"remcohaszing","email":""},{"name":"timneutkens","email":"tim@timneutkens.nl"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/recma-jsx_1.0.1_1753726712284_0.09410795826835328"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-07-28T18:18:32.494Z","publish_time":1753726712494,"_source_registry_name":"default","_cnpm_publish_time":1753726712494},"1.0.0":{"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"bugs":{"url":"https://github.com/mdx-js/recma/issues"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"description":"recma plugin to add support for parsing and serializing JSX","dependencies":{"acorn-jsx":"^5.0.0","estree-util-to-js":"^2.0.0","recma-parse":"^1.0.0","recma-stringify":"^1.0.0","unified":"^11.0.0"},"exports":"./index.js","funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"homepage":"https://github.com/mdx-js/recma","keywords":["abstract","ast","compile","javascript","jsx","plugin","recma-plugin","recma","syntax","tree","unified"],"license":"MIT","name":"recma-jsx","repository":{"type":"git","url":"git+https://github.com/mdx-js/recma.git#main"},"scripts":{},"sideEffects":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"type":"module","version":"1.0.0","_id":"recma-jsx@1.0.0","gitHead":"fa86659efc643b2ab67a3b1dc6357b78aa88e426","types":"./index.d.ts","_nodeVersion":"22.7.0","_npmVersion":"10.9.0","dist":{"shasum":"f7bef02e571a49d6ba3efdfda8e2efab48dbe3aa","size":3722,"noattachment":false,"key":"/recma-jsx/-/recma-jsx-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/recma-jsx/download/recma-jsx-1.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"},{"name":"remcohaszing","email":""},{"name":"timneutkens","email":"tim@timneutkens.nl"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/recma-jsx_1.0.0_1729251514838_0.8773178678734241"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-10-18T11:38:35.021Z","publish_time":1729251515021,"_source_registry_name":"default","_cnpm_publish_time":1729251515021}},"readme":"# recma-jsx\n\n[![Build][badge-build-image]][badge-build-url]\n[![Coverage][badge-coverage-image]][badge-coverage-url]\n[![Downloads][badge-downloads-image]][badge-downloads-url]\n[![Size][badge-size-image]][badge-size-url]\n[![Sponsors][badge-sponsors-image]][badge-collective-url]\n[![Backers][badge-backers-image]][badge-collective-url]\n[![Chat][badge-chat-image]][badge-chat-url]\n\n**[recma][github-recma]** plugin to add support for parsing and serializing\n[JSX][github-io-jsx].\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`unified().use(recmaJsx)`](#unifieduserecmajsx)\n* [Syntax](#syntax)\n* [Syntax tree](#syntax-tree)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Contribute](#contribute)\n* [License](#license)\n\n## What is this?\n\nThis package is a [unified][github-unified]\n([recma][github-recma])\nthat enables JSX.\nYou can use this plugin to add support for parsing and serializing it.\n\n## When should I use this?\n\nYou can use this if you want to use `recma` and JSX.\nYou can also use [`acorn-jsx`][github-acorn-jsx] manually with\n[`acorn`][github-acorn] for parsing.\nAnd use the [`jsx`][github-estree-util-to-js-jsx] handlers from\n[`estree-util-to-js`][github-estree-util-to-js] manually.\n\n## Install\n\nThis package is [ESM only][github-gist-esm].\nIn Node.js (version 16+),\ninstall with [npm][npm-install]:\n\n```sh\nnpm install recma-jsx\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport recmaJsx from 'https://esm.sh/recma-jsx@1'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import recmaJsx from 'https://esm.sh/recma-jsx@1?bundle'\n</script>\n```\n\n## Use\n\nSay we have the following module `example.js`:\n\n```js\nimport recmaJsx from 'recma-jsx'\nimport recmaParse from 'recma-parse'\nimport recmaStringify from 'recma-stringify'\nimport {unified} from 'unified'\n\nconst file = await unified()\n  .use(recmaParse)\n  .use(recmaJsx)\n  .use(recmaStringify)\n  .process('console.log(<em>Hi!</em>)')\n\nconsole.log(String(file))\n```\n\n…running that with `node example.js` yields:\n\n```js\nconsole.log(<em>Hi!</em>);\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is [`recmaJsx`][api-recma-jsx].\n\n### `unified().use(recmaJsx)`\n\nPlugin to add support for parsing and serializing JSX.\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\nNothing (`undefined`).\n\n## Syntax\n\nJSX is parsed and serialized according to [`facebook/jsx`][github-io-jsx].\n\n## Syntax tree\n\nThe syntax tree format used in recma is [esast][github-esast] and\n[estree][github-estree].\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release,\nwe drop support for unmaintained versions of Node.\nThis means we try to keep the current release line,\n`recma-jsx@1`,\ncompatible with Node.js 16.\n\n## Security\n\nAs **recma** works on JS and evaluating JS is unsafe,\nuse of recma can also be unsafe.\nDo not evaluate unsafe code.\n\n## Contribute\n\nSee [§ Contribute][mdxjs-contribute] on our site for ways to get started.\nSee [§ Support][mdxjs-support] for ways to get help.\n\nThis project has a [code of conduct][health-coc].\nBy interacting with this repository,\norganization,\nor community you agree to abide by its terms.\n\n## License\n\n[MIT][file-license] © [Titus Wormer][wooorm]\n\n<!-- Definitions -->\n\n[api-recma-jsx]: #unifieduserecmajsx\n\n[badge-backers-image]: https://opencollective.com/unified/backers/badge.svg\n\n[badge-build-image]: https://github.com/mdx-js/recma/actions/workflows/main.yml/badge.svg\n\n[badge-build-url]: https://github.com/mdx-js/recma/actions\n\n[badge-chat-image]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[badge-chat-url]: https://github.com/mdx-js/mdx/discussions\n\n[badge-collective-url]: https://opencollective.com/unified\n\n[badge-coverage-image]: https://img.shields.io/codecov/c/github/mdx-js/recma.svg\n\n[badge-coverage-url]: https://codecov.io/github/mdx-js/recma\n\n[badge-downloads-image]: https://img.shields.io/npm/dm/recma-jsx.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/recma-jsx\n\n[badge-size-image]: https://img.shields.io/bundlejs/size/recma-jsx\n\n[badge-size-url]: https://bundlejs.com/?q=recma-jsx\n\n[badge-sponsors-image]: https://opencollective.com/unified/sponsors/badge.svg\n\n[esmsh]: https://esm.sh\n\n[file-license]: license\n\n[github-acorn]: https://github.com/acornjs/acorn\n\n[github-acorn-jsx]: https://github.com/acornjs/acorn-jsx\n\n[github-esast]: https://github.com/syntax-tree/esast\n\n[github-estree]: https://github.com/estree/estree\n\n[github-estree-util-to-js]: https://github.com/syntax-tree/estree-util-to-js\n\n[github-estree-util-to-js-jsx]: https://github.com/syntax-tree/estree-util-to-js#jsx\n\n[github-gist-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[github-io-jsx]: http://facebook.github.io/jsx/\n\n[github-recma]: https://github.com/mdx-js/recma\n\n[github-unified]: https://github.com/unifiedjs/unified\n\n[health-coc]: https://github.com/mdx-js/.github/blob/main/code-of-conduct.md\n\n[mdxjs-contribute]: https://mdxjs.com/community/contribute/\n\n[mdxjs-support]: https://mdxjs.com/community/support/\n\n[npm-install]: https://docs.npmjs.com/cli/install\n\n[typescript]: https://www.typescriptlang.org\n\n[wooorm]: https://wooorm.com\n","_attachments":{},"homepage":"https://github.com/mdx-js/recma","bugs":{"url":"https://github.com/mdx-js/recma/issues"},"license":"MIT"}