kinotto / geonames.js

Nodejs and Browser client for Geonames.org REST API :earth_africa:
http://www.geonames.org/export/client-libraries.html
MIT License
88 stars 17 forks source link

Geonames is not a function #49

Closed emerabet closed 1 year ago

emerabet commented 2 years ago

Hello,

following the indications of the readme I get the following error message. TypeError: Geonames is not a function The lib usage changed ?

const { Geonames } = require('geonames.js')

this.geoNameClient = Geonames({
    username: 'xxxx',
    lan: 'en',
    encoding: 'JSON'
  });

Thanks!

corepay commented 1 year ago

I got it working by removing the {}

const Geonames = require('geonames.js')