Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ghoullier/create-dom
Lightweight create DOM element helper
https://github.com/ghoullier/create-dom
dom es2015 util
Last synced: 3 days ago
JSON representation
Lightweight create DOM element helper
- Host: GitHub
- URL: https://github.com/ghoullier/create-dom
- Owner: ghoullier
- License: mit
- Created: 2017-01-27T07:13:21.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-27T07:29:34.000Z (about 8 years ago)
- Last Synced: 2025-01-09T10:56:36.144Z (28 days ago)
- Topics: dom, es2015, util
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# create-dom
[![NPM version][npm-version-image]][npm-url]
[![Gitter][gitter-image]][gitter-url]
[![Dependency Status][dependency-status-image]][dependency-status-url]Lightweight create DOM element helper.
## Install
There are several ways to get a copy of create-dom. Pick whichever one you like:
- Use it via UNPKG: https://unpkg.com/create-dom/index.js. This is a simple way to embed it on a webpage without having to do any other setup.
- Install via NPM: `npm install --save create-dom`
- Install via YARN: `yarn add create-dom`## Require
```js
const dom = require('create-dom');
```## Documentation
- [CHANGELOG](./CHANGELOG.md)
## Examples
Add title with link to body
```js
document.body.appendChild(
dom('div', {}
dom('h1', {}
dom('a', { href: 'https://github.com/ghoullier/create-dom' }, 'Fork me on GitHub!')
)
)
)
```[gitter-image]: https://badges.gitter.im/Join%20Chat.svg
[gitter-url]: https://gitter.im/ghoullier/create-dom[dependency-status-image]: http://img.shields.io/gemnasium/ghoullier/create-dom.svg?style=flat
[dependency-status-url]: https://gemnasium.com/ghoullier/create-dom[npm-version-image]: http://img.shields.io/npm/v/create-dom.svg?style=flat-square
[npm-url]: https://npmjs.org/package/create-dom