# make-element

> elementを作るやつ

Latest version **2.0.0** (published 2018-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install make-element
pnpm add make-element
yarn add make-element
bun add make-element
```

## 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 | 2.0.0 |
| Published | 2018-03-31 |
| First published | 2016-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | honeo |
| Maintainers | honeo |
| Keywords | element, create, dom |

## Links

- npm: https://www.npmjs.com/package/make-element
- Repository: https://github.com/honeo/make-element
- Homepage: https://github.com/honeo/make-element#readme
- Issues: https://github.com/honeo/make-element/issues
- npm.io page: https://npm.io/package/make-element

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2018-03-31
- 1.4.0 — 2017-01-27
- 1.3.0 — 2017-01-26
- 1.2.0 — 2016-11-12
- 1.1.1 — 2016-05-30
- 1.1.0 — 2016-04-12
- 1.0.1 — 2016-04-06
- 1.0.0 — 2016-04-03

## README

# make-element
* [honeo/make-element](https://github.com/honeo/make-element)  
* [make-element](https://www.npmjs.com/package/make-element)

## なにこれ
引数に合わせて要素を作って返す。

## 使い方
```sh
$ npm i make-element
```
```js
// Bundle, Node.js
import makeElement from 'make-element';

// CDN
const makeElement = await import('https://cdn.rawgit.com/honeo/make-element/master/index.mjs').then( (mod)=>{
	return mod.default;
});
```
```js
const anchor = makeElement('a', {href: 'http//example.com/'}, 'Link!');

const span = makeElement('span',
	'classやstyleが複数あればスペースを挟んで統合する。',
	{class: 'foo'}, {class: 'bar'},
	{style: "foo:value;"}, {style: "bar:value;"}
);

const input = makeElement('input', {type: 'button', disabled: true, value: 'Push!'});

const div = makeElement('div', makeElement('span', '引数がNodeなら挿入する。'));
```
```html
<a href="http//example.com/">Link!</a>

<span class="foo bar" style="foo:value; bar:value;">
	classやstyleが複数あればスペースを挟んで統合する。
</span>

<input type="button" value="Push!" disabled>

<div>
	<span>"引数がNodeなら挿入する。"</span>
</div>
```


## prototype拡張
ご利用は計画的に。
```js
import 'make-element/register.mjs';
const element = document.makeElement('tagName');
```

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