0.0.4 • Published 8 years ago

set-attrs v0.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Set Attributes

Set multiple attributes on a DOM element.

Install

npm install set-attrs

Usage

const setAttributes = require('set-attrs');

const el = document.querySelector('svg');

setAttributes(el, {
  width: '80px',
  viewbox: '0 0 80 80',
  'data-link': 'skynet'
});

// => <svg width="80px" viewbox="0 0 80 80" data-link="skynet">...</svg>
0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago