UNPKG

create-expo-cljs-app

Version:

Create a react native application with Expo and Shadow-CLJS!

26 lines (24 loc) 538 B
import { DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DIRECTION_DOWN } from '../inputjs/input-consts'; /** * @private * direction cons to string * @param {constant} direction * @returns {String} */ export default function directionStr(direction) { if (direction === DIRECTION_DOWN) { return 'down'; } else if (direction === DIRECTION_UP) { return 'up'; } else if (direction === DIRECTION_LEFT) { return 'left'; } else if (direction === DIRECTION_RIGHT) { return 'right'; } return ''; }