You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
408 B
16 lines
408 B
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports["default"] = getDataOrAriaProps;
|
|
|
|
function getDataOrAriaProps(props) {
|
|
return Object.keys(props).reduce(function (prev, key) {
|
|
if ((key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') && key.substr(0, 7) !== 'data-__') {
|
|
prev[key] = props[key];
|
|
}
|
|
|
|
return prev;
|
|
}, {});
|
|
} |