anthonyshort-attributes

0.0.1 • Public • Published

attributes

Get an object of all attributes on a DOM element

API

var attributes = require('attributes');
var el = document.querySeletor('#foo');

var attrs = attributes(el);

/*
{
    'id': 'foo',
    'class': 'bar',
    'data-component': 'dialog'
}
*/

Readme

Keywords

Package Sidebar

Install

npm i anthonyshort-attributes

Weekly Downloads

0

Version

0.0.1

License

none

Last publish

Collaborators

  • anthonyshort