npm install --save html-attribute-parser
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' }
*/
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.
Yeoman and Generator-simple-package
MIT © Nghia Tran