create-element-basic
HTML element string creation
Install
Install with npm
npm i create-element-basic --save
Run tests
npm test
Usage
var createElement = require('create-element-basic');
createElement(htmlTag[string], closingTag[Boolean], attributes[object], content[string || function])
Create an HTML tag either closing or opening type.
Examples
createElement('a', true, {href: 'http://www.apple.com'}, "Apple");
createElement('img', false, {src: "foo.png"});
yields:
<a href="http://www.apple.com">Apple</a>
<img src="foo.png" />
API
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Keith Williams
License
Copyright (c) 2014 Keith Williams
Released under the MIT license
This file was generated by verb on December 24, 2014.