Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose options like in pypostal #16

Open
jefffriesen opened this issue Aug 27, 2017 · 2 comments
Open

Expose options like in pypostal #16

jefffriesen opened this issue Aug 27, 2017 · 2 comments

Comments

@jefffriesen
Copy link
Contributor

pypostal has all of these options available:
https://github.com/openvenues/pypostal/blob/master/postal/expand.py#L17-L51

node-postal has direct-to-c sorcery: expand: require('bindings')('expand'). It looks like you can't pass options in (and I couldn't by trial and error).

Is there a way to expose options for the node binding? Or if you can use them, how?

Thanks

@albarrentine
Copy link
Contributor

The options are exposed in node-postal (not really documented though) and can be passed in as a second argument in a JS object:

var postal = require('node-postal');
postal.expand.expand_address('Pine St', {'address_components': postal.expand.ADDRESS_STREET});

The source for node-postal expand is mostly C/C++, options can be found here: https://github.com/openvenues/node-postal/blob/master/src/expand.cc#L61-L98

@serge-medvedev
Copy link

serge-medvedev commented Oct 20, 2023

transliterate option doesn't seem to affect the results: setting it to false doesn't prevent transliterated results from appearing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants