dwyl / esta

:mag: Simple + Fast ElasticSearch Node.js client. Beginner-friendly defaults & Heroku support :white_check_mark: :rocket:
49 stars 10 forks source link

Simplify lib/options.js using url.parse ? #83

Closed nelsonic closed 9 years ago

nelsonic commented 9 years ago

Can we simplify the parsing of Bonsai/SearchBox urls in lib/options.js: https://github.com/nelsonic/esta/blob/master/lib/options.js#L17-L27 By using url.parse (node.js core method): https://nodejs.org/docs/latest/api/url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost example: https://github.com/ideaq/hapi-auth-jwt2/blob/master/example/real_world_example_using_redis_on_heroku.js#L10