UNPKG

necto

Version:

Necto compliments Redux by providing a composable, declarative api to create flows through redux (Action -> Reducer or Action -> Saga). The intent of Necto is to reduce boilerplate, simplify and standardize action creators, and group action logic so that

10 lines (7 loc) 263 B
const throwIfMissing = (name, source) => { throw new Error(`Missing parameter "${name}" in ${source}.`); }; export const throwConditionalIfMissing = (condition, name, source) => { condition && throwIfMissing(name, source); }; export default throwIfMissing;