@atlaskit/profilecard
Version:
A React component to display a card with user information.
19 lines (18 loc) • 601 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var filterActions = function filterActions() {
var actions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var data = arguments.length > 1 ? arguments[1] : undefined;
return actions.filter(function (action) {
if (!action.shouldRender) {
return true;
} else if (typeof action.shouldRender !== 'function') {
return Boolean(action.shouldRender);
}
return action.shouldRender(data);
});
};
var _default = exports.default = filterActions;