Skip to content

EventEmitter.prototype.on returns this #1079

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

Merged
merged 1 commit into from
Jul 26, 2018
Merged

Conversation

marlun78
Copy link
Contributor

Having EventEmitter.prototype.on returnthis enables subscribing to events as part of the config chain.

i18n.createInstance()
  .use(ChainedBackend)
  .use(LanguageDetector)
  .use(reactI18nextModule)
  .on('initialized', () => console.log('initialized'))
  .init(i18nOptions);

This commit closes #1077.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 85.784% when pulling 779cec5 on marlun78:master into d6597d7 on i18next:master.

@jamuhl jamuhl merged commit f5d8ce7 into i18next:master Jul 26, 2018
@jamuhl
Copy link
Member

jamuhl commented Jul 26, 2018

thank you - published in i18next@11.5.0

@marlun78
Copy link
Contributor Author

Cool, thanks!

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.

Have the EventEmitter.prototype.on return this
3 participants