Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

fix: remove use of assert module #95

Merged
merged 2 commits into from
Feb 14, 2020
Merged

Conversation

achingbrain
Copy link
Member

The polyfill is big, we can simulate it by throwing an Error and it doesn't work under React Native.

The polyfill is big, we can simulate it by throwing an Error and it doesn't work under React Native.
src/index.js Outdated
if (typeof registrar !== 'object') {
throw new Error('a registrar object is required')
}
if (typeof registrar.handle !== 'function') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a function to validate registrar? This way, we would not have the constructor so noisy

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vasco-santos vasco-santos merged commit 8fe6d18 into master Feb 14, 2020
@vasco-santos vasco-santos deleted the remove-use-of-assert branch February 14, 2020 11:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants