html-attribute-parser
v1.0.0
Published
Attribute parser for html tag
Downloads
1,962
Readme
html-attribute-parser
Installation
npm install --save html-attribute-parser
Usage
var htmlAttributeParser = require('html-attribute-parser');
let text = '<button attr class="btn btn-primary" id="submit" on-click="callFunction()">Hello world</button>';
let tag = htmlAttributeParser(text)
console.log(tag);
/* return
{ tagName: 'button',
attributes:
{ attr: true,
class: 'btn btn-primary',
id: 'submit',
'on-click': 'callFunction()' },
value: 'Hello world' }
*/
Getting To Know Yeoman
Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced. Feel free to learn more about him.
Created with
Yeoman and Generator-simple-package
License
MIT © Nghia Tran