Skip to content

Support property getter functions #8

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

Open
mohsen1 opened this issue Dec 15, 2015 · 4 comments
Open

Support property getter functions #8

mohsen1 opened this issue Dec 15, 2015 · 4 comments

Comments

@mohsen1
Copy link
Owner

mohsen1 commented Dec 15, 2015

From @matthiasg on December 15, 2015 8:5

Any plans to also support property getters (similar to what dev tools in chrome do) or just enumerate them like normal properties

Copied from original issue: mohsen1/json-formatter#40

@mohsen1
Copy link
Owner Author

mohsen1 commented Dec 15, 2015

Because invoking a getter function can potentially change state of the program and this module should not really do that, I don't know what's the right answer.

Maybe we render getter functions without their actual values?

@mohsen1
Copy link
Owner Author

mohsen1 commented Dec 15, 2015

From @matthiasg on December 15, 2015 9:54

@mohsen1 the perfect way would of course be to to it like chrome. just show them with some different styling and retrieve value on click.

but i would be happy even if it did potentially change the state, since getters shouldnt be implemented with bad side-effects anyway.

@mohsen1
Copy link
Owner Author

mohsen1 commented Dec 15, 2015

I see. Makes sense. I will do it. Per #35 I want to use json-formatter-js internally in this module. I'm moving this to that repo.

@matthiasg
Copy link

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants