# hyperscript-attribute-to-property

> Convert hyperscript attributes to properties

Latest version **1.0.2** (published 2018-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install hyperscript-attribute-to-property
pnpm add hyperscript-attribute-to-property
yarn add hyperscript-attribute-to-property
bun add hyperscript-attribute-to-property
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-07-27 |
| First published | 2016-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Feross Aboukhadijeh |
| Maintainers | feross |
| Keywords | es6, template, template string, hyperscript, react, vdom, virtual-dom, jsx |

## Links

- npm: https://www.npmjs.com/package/hyperscript-attribute-to-property
- Repository: https://github.com/feross/hyperscript-attribute-to-property
- Issues: https://github.com/feross/hyperscript-attribute-to-property/issues
- npm.io page: https://npm.io/package/hyperscript-attribute-to-property

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-07-27
- 1.0.1 — 2018-06-09
- 1.0.0 — 2016-03-05

## README

# hyperscript-attribute-to-property [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]

[travis-image]: https://img.shields.io/travis/feross/hyperscript-attribute-to-property/master.svg
[travis-url]: https://travis-ci.org/feross/hyperscript-attribute-to-property
[npm-image]: https://img.shields.io/npm/v/hyperscript-attribute-to-property.svg
[npm-url]: https://npmjs.org/package/hyperscript-attribute-to-property
[downloads-image]: https://img.shields.io/npm/dm/hyperscript-attribute-to-property.svg
[downloads-url]: https://npmjs.org/package/hyperscript-attribute-to-property
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
[standard-url]: https://standardjs.com

### Convert hyperscript attributes to properties

Some html attributes have different JavaScript property names. The most annoying of these
is `class` v.s. `className`.

With this package, you can do this:

```js
var vnode = h('div', { class: 'my-class' })
```

Instead of this:

```js
var vnode = h('div', { className: 'my-class' })
```

Works with [virtual-dom](https://www.npmjs.com/package/virtual-dom), [react](https://www.npmjs.com/package/react), [hyperscript](https://www.npmjs.com/package/hyperscript), or any DOM builder with a hyperscript-style API: `h(tagName, attrs, children)`.

## install

```
npm install hyperscript-attribute-to-property
```

## usage

###  example

```js
var attrToProp = require('hyperscript-attribute-to-property')
var h = attrToProp(require('virtual-dom/h'))
```

### hyperx

If you use the [hyperx](https://npmjs.com/package/hyperx) package, then this functionality
is built-in and implemented via this package :)

## license

MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).

---
_Source: https://npm.io/package/hyperscript-attribute-to-property · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
