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

feat(sort) option to disable sorting #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Soopyboo32
Copy link
Contributor

im using this just to compare the 2 nw calcs and may as well pull request as its annoying to manually patch each skyhelper-networth version

@@ -27,7 +27,7 @@ const calculateNetworth = (items, purseBalance, bankBalance, prices, onlyNetwort
}

// Sort items by price
if (!onlyNetworth && categories[category].items.length > 0) {
if (sortData && !onlyNetworth && categories[category].items.length > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also disables combining items like if you have 10 stacks of enchanted hay bales it will shows each stack instead of combining. See .reduce below.

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

Successfully merging this pull request may close these issues.

2 participants