MCPcopy
hub / github.com/redux-loop/redux-loop / isLoop

Function isLoop

src/loop.js:4–11  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

2import Cmd, { isCmd } from './cmd';
3
4export const isLoop = (array) => {
5 return (
6 Array.isArray(array) &&
7 array.length === 2 &&
8 isCmd(array[1]) &&
9 !isCmd(array[0])
10 );
11};
12
13export const getCmd = (loop) => {
14 return isLoop(loop) ? loop[1] : null;

Callers 7

loop.spec.jsFile · 0.90
combineReducersFunction · 0.90
reduce-reducers.jsFile · 0.90
getCmdFunction · 0.85
getModelFunction · 0.85
liftStateFunction · 0.85

Calls 1

isCmdFunction · 0.90

Tested by

no test coverage detected