Skip to content

Conversation

@fregante
Copy link
Member

@fregante fregante commented Jun 3, 2020

Follows #3168

With a few exceptions, .reduce doesn't actually reduce (heh) the amount of code needed.

@fregante fregante added the meta Related to Refined GitHub itself label Jun 3, 2020
count += looseParseInt(reaction.textContent!);
}

return count;
Copy link
Member Author

Choose a reason for hiding this comment

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

// If there are no tags in the repository
if (nodes.length === 0) {
return tags;
tags[commit].push(node.name);
Copy link
Member Author

Choose a reason for hiding this comment

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

return description
.split(splittingRegex)
.reduce(splitTextReducer, new DocumentFragment());
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Test

Look at this very discussion’s title or a PR list: https://github.com/sindresorhus/refined-github/pulls

return defaults;
}, {}));
return JSON.stringify(getFeatures().map(name => [`feature:${name}`, true]));
// TODO: unignore after https://github.com/DefinitelyTyped/DefinitelyTyped/pull/42036
Copy link
Member Author

Choose a reason for hiding this comment

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

Test

Visit the Options page

Copy link
Member Author

@fregante fregante Jun 3, 2020

Choose a reason for hiding this comment

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

Test doesn't pass. Fixing.

Edit: fixed in e226f9d

entries[entry] = `./source/${entry}`;
return entries;
}, {}),
].map(file => [file, `./source/${file}`])),
Copy link
Member Author

Choose a reason for hiding this comment

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

Test

If it compiles, it passes

@fregante fregante marked this pull request as draft June 3, 2020 15:22
@fregante fregante marked this pull request as ready for review June 3, 2020 15:24
@fregante fregante merged commit a121cc8 into master Jun 3, 2020
@fregante fregante deleted the bye-reduce branch June 3, 2020 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

1 participant