Skip to content

Releases: owsas/opensource

prefjs@1.1.3

15 Apr 16:43
Compare
Choose a tag to compare

Prefjs fromObject now accepts an object with extra parameters to configure a custom locale.

Example:

const object2 = {
  description: 'I am a product',
  description_es: 'Yo soy un producto',
  title: 'T-shirt - XL',
  title_es: 'Camiseta - XL'
};

pref.getFromObject(object2, 'title'); // T-shirt - XL
pref.getFromObject(object2, 'description'); // I am a product

// And in spanish
pref.setCurrentLocale('es'); // change to spanish
pref.getFromObject(object2, 'title'); // Camiseta - XL
pref.getFromObject(object2, 'description'); // Yo soy un producto

// Get data in other locale although pref main
// locale is currently set to 'es'
pref.getFromObject(object2, 'description', { customLocale: 'en' }); // I am a product

prefjs@1.1.0

13 Oct 17:33
Compare
Choose a tag to compare

Created fromObject function. Check documentation in README for more details :)

nominatim-js@1.0.9

04 Sep 02:11
Compare
Choose a tag to compare

Nominatim endpoint can be customised.