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

Consider adding default value for BN instance #4

Open
frangio opened this issue Dec 27, 2018 · 2 comments
Open

Consider adding default value for BN instance #4

frangio opened this issue Dec 27, 2018 · 2 comments

Comments

@frangio
Copy link
Collaborator

frangio commented Dec 27, 2018

https://github.com/ZeppelinSolutions/chai-bn/blob/1900f60a9d5fbba3d44c755e24b5efe2f81d3a1d/chai-bn.js#L1

We could add a default value of BN = require('bn.js'). What do you think? Coupled with #3 it works out nicely I think.

@nventuro
Copy link

chai-bignumber does this, but I'm not convinced it's that useful of a feature: I'd either always have the dependency injected, or always require it inside the plugin, not both.

@frangio
Copy link
Collaborator Author

frangio commented Dec 28, 2018

It's definitely useful if it makes the most common scenario simpler to use. Would it be the most common scenario? I don't see why not.

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

2 participants