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