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

getByPrototype #375

Open
2 tasks done
yofukashino opened this issue Feb 7, 2023 · 6 comments · May be fixed by #507
Open
2 tasks done

getByPrototype #375

yofukashino opened this issue Feb 7, 2023 · 6 comments · May be fixed by #507
Assignees
Labels
addon development Relates to developing addons, eg APIs or scripts enhancement New feature or request

Comments

@yofukashino
Copy link
Contributor

Describe the feature request

A function to get by props on prototype

Why should this be added?

It should be a good addition to webpack module

Additional information

No response

Please confirm the following

  • This is a feature request for Replugged itself, not a feature request for a plugin or theme
  • I searched the issues to make sure this feature has not been requested before.
@yofukashino yofukashino added the enhancement New feature or request label Feb 7, 2023
@asportnoy
Copy link
Member

getByProps should already do this. Do you have an example?

@asportnoy asportnoy added the needs more info Further information is requested label Feb 7, 2023
@yofukashino
Copy link
Contributor Author

getByProps should already do this. Do you have an example?

for example getting GuildRecord function, with prototype "getRole", "getIconURL" cant get it with replugged.webpack.getByProps("getRole", "getIconURL", {all: true}) but can get it with Webpack.getModule((m) => ["getRole", "getIconURL"].every((p) => Object.values(m.exports).some((m) => m?.prototype?.[p])), )

@asportnoy
Copy link
Member

See the note on https://guide.replugged.dev/docs/plugins/modules#options. That's why you're not getting any results for that.

@yofukashino
Copy link
Contributor Author

Still gives only the favourite guild record not general GuildRecord function. It's different

@asportnoy
Copy link
Member

I see what you're saying. I guess we can add a filter.byPrototype.

@asportnoy asportnoy added available (leave comment to claim) If you're interested in taking on this issue, please leave a comment! and removed needs more info Further information is requested labels Feb 8, 2023
@yofukashino
Copy link
Contributor Author

Yeah thanks for considering the feature

@asportnoy asportnoy added the addon development Relates to developing addons, eg APIs or scripts label Jun 9, 2023
@FedeIlLeone FedeIlLeone removed the available (leave comment to claim) If you're interested in taking on this issue, please leave a comment! label Jun 27, 2023
@FedeIlLeone FedeIlLeone linked a pull request Jul 4, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon development Relates to developing addons, eg APIs or scripts enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants