Merge pull request #69 from Derpthemeus/automatic-base-eto

Add baseline ETo endpoint
This commit is contained in:
Samer Albahra
2019-07-02 15:09:27 -07:00
committed by GitHub
10 changed files with 642 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ const ADJUSTMENT_METHOD: { [ key: number ] : AdjustmentMethod } = {
* @return A promise that will be resolved with the coordinates of the best match for the specified location, or
* rejected with an error message if unable to resolve the location.
*/
async function resolveCoordinates( location: string ): Promise< GeoCoordinates > {
export async function resolveCoordinates( location: string ): Promise< GeoCoordinates > {
if ( !location ) {
throw "No location specified";
@@ -444,7 +444,7 @@ function ipToInt( ip: string ): number {
* @param parameter An array of parameters or a single parameter value.
* @return The first element in the array of parameter or the single parameter provided.
*/
function getParameter( parameter: string | string[] ): string {
export function getParameter( parameter: string | string[] ): string {
if ( Array.isArray( parameter ) ) {
parameter = parameter[0];
}