src/lib/coordinates.js
/**
   * Expects an string or array of the form "x, y". Throws if the input is invalid
   * @param  {string|array} coordinates
   */
Expects an string or array of the form "x, y". Throws if the input is invalid
@param  {string|array} coordinates
Expects an string or array of the form " x y " . Throws if the input is invalid @param { string|array } coordinates
checkIsValid(coordinate) {
    if (!this.isValid(coordinate)) {
      throw new Error(`The coordinate "${coordinate}" are not valid`)
    }
  }
checkIsValid ( coordinate ) { if ( ! this . isValid ( coordinate ) ) { throw new Error ( ` ${ coordinate } ` ) } }
Expects an string or array of the form "x, y".
Expects an string or array of the form " x y " .