Attribute names are lowercased in HTML, so just doing a string comparison should be fine:

```js
return attrName.substr(0, 5) === 'data-';
```

Also, the current version could be shortened to

```js
domNames = Object.keys(el.attribs).filter(RegExp.prototype.test, rDataAttr.test);
```