🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-html-parser-ultimate

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-html-parser-ultimate

A utility for converting HTML strings into React components

1.0.7
latest
Source
npm
Version published
Weekly downloads
341
162.31%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

react-html-parser-ultimate

A utility for converting HTML strings into React components

Installation

npm i react-html-parser-ultimate

or

yarn add react-html-parser-ultimate

Usage

import { parseHtml } from 'react-html-parser-ultimate';

parseHtml(html, {
    onTransform: (node, index, nodeToElementFn) => {
        if (node.name === 'div') {
            node.name = 'span';
            return nodeToElementFn(node, index);
        }
        return undefined;
    },
    allowScript: true,
});

FAQs

Package last updated on 10 Oct 2018

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