We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
👋 Hi there!
We have code that looks like this:
import colors from 'colors.less'; function exampleUtilFunction(color) { if (!colors.hasOwnProperty(color)) { throw new Error(); } }
When using this mock, it fails with:
TypeError: colors.hasOwnProperty is not a function
As a quick fix, we added this code to the proxy:
if (key === 'hasOwnProperty') { return () => true; }
I think it'd be nice if identity-obj-proxy supported the methods on Object.prototype. I'm happy to submit a PR if it would be accepted. :)
identity-obj-proxy
Object.prototype
The text was updated successfully, but these errors were encountered:
No branches or pull requests
👋 Hi there!
We have code that looks like this:
When using this mock, it fails with:
As a quick fix, we added this code to the proxy:
I think it'd be nice if
identity-obj-proxy
supported the methods onObject.prototype
. I'm happy to submit a PR if it would be accepted. :)The text was updated successfully, but these errors were encountered: