Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

tripadvisor-locales

1.0.739 • Public • Published

tripadvisor-locales

NPM version Downloads

Infers the best TripAdvisor URL for a given locale.

Usage

Install the library with npm install tripadvisor-locales

var TripadvisorLocales = require('tripadvisor-locales').TripadvisorLocales;
 
TripadvisorLocales.bestDomainFor('en_US'); //-> 'www.tripadvisor.com'
TripadvisorLocales.bestDomainFor("en_CA"); //-> 'www.tripadvisor.ca'
 
TripadvisorLocales.bestPageUrlFor({locale: 'en_US', locationId:'1234'}); //-> 'https://www.tripadvisor.com/1234'

Install

npm i tripadvisor-locales

DownloadsWeekly Downloads

89

Version

1.0.739

License

Apache-2.0

Unpacked Size

24.7 kB

Total Files

12

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar