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 bound methods #87

Merged
merged 6 commits into from
Feb 13, 2017
Merged

Expose bound methods #87

merged 6 commits into from
Feb 13, 2017

Conversation

thom4parisot
Copy link
Owner

Internal reorg of tldjs to look like more than a bunch of functions rather than a do-too-much-of-a-class.

import { getDomain } from 'tldjs';
getDomain(url)

Custom domains can be added by requesting a new instance of tldjs:

import tld from 'tldjs';

const customTld = tld.init(['localhost']);

fixes #86

@Treora
Copy link

Treora commented Feb 7, 2017

That looks fresh and shiny! And it indeed solves the issue. I hope nobody minds the API change for customising rules and validHosts (please do remember to increase the major version number).

@thom4parisot
Copy link
Owner Author

@Treora cool, thanks for your feedback :-)

I will certainly major bump before releasing. I need to tweak a few things before pushing the new version to npm.

@thom4parisot thom4parisot merged commit 981bbae into master Feb 13, 2017
@thom4parisot thom4parisot deleted the feature-86 branch February 13, 2017 16:34
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

Successfully merging this pull request may close these issues.

Expose methods as functions (bound methods)
2 participants