Skip to content

Commit

Permalink
Fix typos, remove unused functions
Browse files Browse the repository at this point in the history
The functions are already defined in `src/util/mapbox.ts`
  • Loading branch information
fredj committed Aug 31, 2021
1 parent 55ad0bf commit 368d380
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export function isCounterClockwise(a: Point, b: Point, c: Point): boolean {
}

/**
* Returns the signed area for the polygon ring. Postive areas are exterior rings and
* Returns the signed area for the polygon ring. Positive areas are exterior rings and
* have a clockwise winding. Negative areas are interior rings and have a counter clockwise
* ordering.
*
Expand Down Expand Up @@ -409,7 +409,7 @@ export function sphericalToCartesian([r, azimuthal, polar]: [number, number, num

/* global self, WorkerGlobalScope */
/**
* Retuns true if the when run in the web-worker context.
* Returns true if the when run in the web-worker context.
*
* @private
* @returns {boolean}
Expand Down Expand Up @@ -500,12 +500,3 @@ export function b64DecodeUnicode(str: string) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); //eslint-disable-line
}).join(''));
}

const mapboxHTTPURLRe = /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;
export function isMapboxHTTPURL(url: string): boolean {
return mapboxHTTPURLRe.test(url);
}

export function hasCacheDefeatingSku(url: string) {
return url.indexOf('sku=') > 0 && isMapboxHTTPURL(url);
}

0 comments on commit 368d380

Please sign in to comment.