1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-03-05 13:20:20 -05:00
Files
Sonarr/frontend/src/Store/Selectors/createCommandSelector.ts
2025-04-28 17:12:41 -07:00

12 lines
394 B
TypeScript

import { createSelector } from 'reselect';
import { findCommand } from 'Utilities/Command';
import createCommandsSelector from './createCommandsSelector';
function createCommandSelector(name: string, constraints = {}) {
return createSelector(createCommandsSelector(), (commands) => {
return findCommand(commands, { name, ...constraints });
});
}
export default createCommandSelector;