New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-html-to-jsx

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-html-to-jsx

The HTML to JSX Converter is a Node.js module that seamlessly transforms HTML markup into JSX syntax, ideal for your React projects.

latest
Source
npmnpm
Version
1.4.4
Version published
Weekly downloads
1.2K
19.67%
Maintainers
1
Weekly downloads
 
Created
Source

Overview

Build Status Coverage Status License

This HTML to JSX Library provides functions to manipulate and transform HTML strings in JavaScript. It has utilities to wrap HTML content, close self-closing tags, convert event attributes to camel case, convert class attributes to className, remove HTML comments, indent HTML code, convert inline styles to objects, and validate HTML structure.

Contributors

  • Mateus Nava

Installation

To use the HTML Converter Library in your project, you can install it via npm:

npm install node-html-to-jsx

Usage

Import the library into your JavaScript file:

import convert from 'node-html-to-jsx';

Then, you can use the convert function to transform your HTML code:

const convertedHTML = convert('<div><p class="paragraph">Hello, world!</p></div>');

Demo

See DEMO

Note

This library is primarily designed for manipulating HTML strings in JavaScript environments, particularly for use with frameworks like React.

Contributing

We welcome contributions! Please see the CONTRIBUTING.md file for guidelines and instructions on how to get started.

License

This library is open-source and available under the MIT License.

Keywords

frontend

FAQs

Package last updated on 18 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts