npm.io
1.0.6 • Published 6 years ago

react-domproperty

Licence
MIT
Version
1.0.6
Deps
0
Size
12 kB
Vulns
0
Weekly
0

react-domproperty

Convert HTML DOM attributes to React DOM attributes

Build Status Code Coverage version MIT License PRs Welcome

Why?

Usage

const convert = require('react-domproperty');
// nomral html attribute
convert('autoplay'); // => autoPlay
convert('crossOrigin'); // => crossOrigin
// SVG attribute
convert('xml:base'); // => xmlBase
// event handler
convert('onclick'); // => onClick
// bypass custom attributes
convert('custom-x'); // => custom-x

Supported Attributes

See attributes.

Other

This project uses ts-rollup-boilerplate as a starter.

LICENSE

MIT

Keywords