packages/warriorjs-geography/src/verifyRelativeDirection.js
function verifyRelativeDirection(direction) {
  if (!RELATIVE_DIRECTIONS.includes(direction)) {
    throw new Error(
      `Unknown direction: '${direction}'. Should be one of: '${FORWARD}', '${RIGHT}', '${BACKWARD}' or '${LEFT}'.`,
    );
  }
}
function verifyRelativeDirection(direction) {
  if (!RELATIVE_DIRECTIONS.includes(direction)) {
    throw new Error(
      `Unknown direction: '${direction}'. Should be one of: '${FORWARD}', '${RIGHT}', '${BACKWARD}' or '${LEFT}'.`,
    );
  }
}
function verifyRelativeDirection ( direction ) { if ( ! RELATIVE_DIRECTIONS . includes ( direction ) ) { throw new Error ( ` ${ direction } ${ FORWARD } ${ RIGHT } ${ BACKWARD } ${ LEFT } ` , ) ; } }
Checks if the given direction is a valid relative direction.

@param {string} direction The direction.

@throws Will throw if the direction is not valid.
Checks if the given direction is a valid relative direction .