Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eldoy/mrkp

Create HTML with a single Javascript function
https://github.com/eldoy/mrkp

Last synced: 6 days ago
JSON representation

Create HTML with a single Javascript function

Awesome Lists containing this project

README

        

# MRKP

Create HTML with a single Javascript function.

Isomorphic, works in both the browser and in Node. Only 218 bytes minified.

### Install
```
npm i mrkp
```

### Usage
In node:
```javascript
var h = require('mrkp')
```

In the browser:
```html
"+(t||"")+("string"==typeof i?i:(i||[]).join(""))+(null===t?"":"</"+n+">")}

```

Make HTML:
```javascript
h('div', 'Content', { class: 'active' }, [
h('ul', '', {}, [
h('li', 'Meat'),
h('li', 'Milk'),
h('li', 'Butter')
])
])
```
MIT Licensed. Enjoy!