index.js
function attributes(attrs) {
  attrs = attrs || {};
  var ident = attrs.id || '';
  var classes = attrs.classes || [];
  var keyvals = [];
  Object.keys(attrs).forEach(function (k) {
    if (k !== 'classes' && k !== 'id') keyvals.push([k,attrs[k]]);
  });
  return [ident, classes, keyvals];
}
function attributes(attrs) {
  attrs = attrs || {};
  var ident = attrs.id || '';
  var classes = attrs.classes || [];
  var keyvals = [];
  Object.keys(attrs).forEach(function (k) {
    if (k !== 'classes' && k !== 'id') keyvals.push([k,attrs[k]]);
  });
  return [ident, classes, keyvals];
}
function attributes ( attrs ) { attrs = attrs || { } ; var ident = attrs . id || '' ; var classes = attrs . classes || [ ] ; var keyvals = [ ] ; Object . keys ( attrs ) . forEach ( function ( k ) { if ( k !== 'classes' && k !== 'id' ) keyvals . push ( [ k , attrs [ k ] ] ) ; } ) ; return [ ident , classes , keyvals ] ; }
Returns an attribute list, constructed from the dictionary attrs.
@param  {Object} attrs Attribute dictionary
@return {Array}        Attribute list
Returns an attribute list constructed from the dictionary attrs .