1.0.5 • Published 5 months ago

document-make v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

document-make

The tool for making DOM elements quickly.

Description

  • This is currently under development
  • The dm function gives you a concise way of programmatically making DOM elements with attributes and children.

Installation

npm install document-make -g

Usage

import dm from 'document-make'

const hr = dm('hr')  // makes an hr element
const label = dm('label', {for: 'file-input'}, 'Choose a cool picture: ')  // makes a label with text
const input = dm('input', {type: 'file', id: 'file-input', name: 'file-input', accept: 'image/png'})  // makes a file input with an id and name
const div = dm('div', {}, label, input, hr, 'Great choice!')  // makes a div containing the previous elements and text

To-do

  • Switch to Typescript
1.0.5

5 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago