@pretto/places 0.16.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -137,6 +137,7 @@ import { geolocSearch } from '@pretto/places'
137
137
  const results = await geolocSearch.get('75010')
138
138
  // result object format :
139
139
  // [{
140
+ // city: 'Paris'
140
141
  // code: '75010',
141
142
  // coordinates: [2.347, 48.8589],
142
143
  // }]
@@ -1,4 +1,5 @@
1
1
  declare type GeolocSearchResult = {
2
+ city: string;
2
3
  code: string;
3
4
  coordinates: [number, number];
4
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"geolocSearch.d.ts","sourceRoot":"","sources":["../src/geolocSearch.ts"],"names":[],"mappings":"AAAA,aAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9B,CAAA;AAwCD,eAAO,MAAM,GAAG,WAAY,MAAM,kBAAiB,MAAM,KAAS,QAAQ,kBAAkB,EAAE,CAQ7F,CAAA"}
1
+ {"version":3,"file":"geolocSearch.d.ts","sourceRoot":"","sources":["../src/geolocSearch.ts"],"names":[],"mappings":"AAAA,aAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9B,CAAA;AAyCD,eAAO,MAAM,GAAG,WAAY,MAAM,kBAAiB,MAAM,KAAS,QAAQ,kBAAkB,EAAE,CAQ7F,CAAA"}
package/dist/index.js CHANGED
@@ -239,6 +239,7 @@ var countrySearch = /*#__PURE__*/Object.freeze({
239
239
  });
240
240
 
241
241
  const formatData = (results) => results.map(result => ({
242
+ city: result.nom,
242
243
  code: result.code,
243
244
  coordinates: result.centre.coordinates,
244
245
  }));
package/dist/module.js CHANGED
@@ -229,6 +229,7 @@ var countrySearch = /*#__PURE__*/Object.freeze({
229
229
  });
230
230
 
231
231
  const formatData = (results) => results.map(result => ({
232
+ city: result.nom,
232
233
  code: result.code,
233
234
  coordinates: result.centre.coordinates,
234
235
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pretto/places",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",