Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-fragmate

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-fragmate

React-Fragmate is a lightweight and easy-to-use utility designed to handle HTML parsing in React applications. Specifically, it removes unwanted `div` wrappers generated when using `dangerouslySetInnerHTML`. With ES Modules, modern coding standards, and n

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by66.67%
Maintainers
1
Weekly downloads
 
Created
Source

React-Fragmate

React-Fragmate is a lightweight and easy-to-use utility designed to handle HTML parsing in React applications. Specifically, it removes unwanted div wrappers generated when using dangerouslySetInnerHTML. With ES Modules, modern coding standards, and no dependencies, integrating and using React-Fragmate is a breeze.

Table of Contents

  • Installation
  • Usage
  • Contributing
  • License

Installation

Install React-Fragmate via npm with the following command:

npm install react-fragmate

Usage

  1. Importing: Import the Fragmate function from the react-fragmate package in your file.

    import { Fragmate } from 'react-fragmate';
    
  2. Utilization: Utilize the Fragmate function to process the HTML content. The function will automatically remove any unwanted deleteDiv tags from the given HTML string.

    const htmlString = "<deleteDiv>Some content</deleteDiv>";
    const cleanedHtml = Fragmate(htmlString);
    
    // Output: 'Some content'
    console.log(cleanedHtml);
    

Contributing

We welcome contributions from the community. If you'd like to contribute, please fork the repository, make your changes, and open a pull request. We'd be happy to discuss and review your changes to get them merged in!

License

React-Fragmate is MIT licensed.

FAQs

Package last updated on 10 Oct 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc