packages/warriorjs-geography/src/verifyAbsoluteDirection.js
function verifyAbsoluteDirection(direction) {
  if (!ABSOLUTE_DIRECTIONS.includes(direction)) {
    throw new Error(
      `Unknown direction: '${direction}'. Should be one of: '${NORTH}', '${EAST}', '${SOUTH}' or '${WEST}'.`,
    );
  }
}
function verifyAbsoluteDirection(direction) {
  if (!ABSOLUTE_DIRECTIONS.includes(direction)) {
    throw new Error(
      `Unknown direction: '${direction}'. Should be one of: '${NORTH}', '${EAST}', '${SOUTH}' or '${WEST}'.`,
    );
  }
}
function verifyAbsoluteDirection ( direction ) { if ( ! ABSOLUTE_DIRECTIONS . includes ( direction ) ) { throw new Error ( ` ${ direction } ${ NORTH } ${ EAST } ${ SOUTH } ${ WEST } ` , ) ; } }
Checks if the given direction is a valid absolute direction.

@param {string} direction The direction.

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