You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

html-attribute-parser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-attribute-parser

Attribute parser for html tag

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
414
26.61%
Maintainers
1
Weekly downloads
 
Created
Source

html-attribute-parser

NPM version Build Status Dependency Status Coverage percentage

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

FAQs

Package last updated on 17 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts