create-markup
v1.0.0
Published
Create a dangerouslySetInnerHTML object for React.
Downloads
2
Maintainers
Readme
create-markup
Create a new object containing only the key __html and your string data as the value.
Installation
npm install create-markup --save
Usage
import createMarkup from 'create-markup';
const markup = createMarkup('hello'); // {__html:'hello'}
<div dangerouslySetInnerHTML={markup} />
Tests
npm test
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
Release History
- 1.0.0 Initial release