diff --git a/src/index.test.ts b/src/index.test.ts index b2443f8..2fe21ab 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -57,16 +57,16 @@ describe('generateTags()', () => { [ 'g', '19.094', 'lon' ], [ 'g', '19.09', 'lon' ], [ 'g', '19', 'lon' ], - [ 'G', 'geohash' ], - [ 'g', 'u2mwdd8q4', 'geohash' ], - [ 'g', 'u2mwdd8q', 'geohash' ], - [ 'g', 'u2mwdd8', 'geohash' ], - [ 'g', 'u2mwdd', 'geohash' ], - [ 'g', 'u2mwd', 'geohash' ], - [ 'g', 'u2mw', 'geohash' ], - [ 'g', 'u2m', 'geohash' ], - [ 'g', 'u2', 'geohash' ], - [ 'g', 'u', 'geohash' ], + [ 'G', 'gh' ], + [ 'g', 'u2mwdd8q4', 'gh' ], + [ 'g', 'u2mwdd8q', 'gh' ], + [ 'g', 'u2mwdd8', 'gh' ], + [ 'g', 'u2mwdd', 'gh' ], + [ 'g', 'u2mwd', 'gh' ], + [ 'g', 'u2mw', 'gh' ], + [ 'g', 'u2m', 'gh' ], + [ 'g', 'u2', 'gh' ], + [ 'g', 'u', 'gh' ], [ 'G', 'countryCode' ], [ 'g', 'HU', 'countryCode' ], [ 'g', 'HUN', 'countryCode' ], diff --git a/src/index.ts b/src/index.ts index ffe09dd..c0728c1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -183,12 +183,12 @@ const generateTags = (input: InputData, opts: Options): GeoTags[] => { fullGeohash = input.geohash } if(fullGeohash && fullGeohash.length > 0 && opts.legacy === false) { - tags.push(['G', 'geohash' ]); + tags.push(['G', 'gh' ]); } for (let i = fullGeohash.length; i > 0; i--) { const partialGeohash = fullGeohash.substring(0, i); const tag: Geohash = ['g', partialGeohash ] - if(!opts.legacy) tag.push('geohash') + if(!opts.legacy) tag.push('gh') tags.push(tag); } }