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

It's not a polyfill #2

Open
rexblack opened this issue Apr 26, 2019 · 0 comments
Open

It's not a polyfill #2

rexblack opened this issue Apr 26, 2019 · 0 comments

Comments

@rexblack
Copy link

This is actually not a polyfill but a ponyfill which then is misleading in the way how to use it.

From a polyfill you would expect to import it like this and all is done:

import 'node-contains';

Instead you will need you use it like this:

import contains from 'node-contains';

if (contains(node, anotherNode)) {
  /* ... */
}

So, please either make it a polyfill by patching Node.prototype or call it a ponyfill.

Of course, best would be to create some kind of documentation... ;-)

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

1 participant