MCPcopy Index your code
hub / github.com/refined-github/refined-github / selectSum

Function selectSum

source/features/highest-rated-comment.tsx:29–31  ·  view source on GitHub ↗
(selector: string, container: HTMLElement)

Source from the content-addressed store, hash-verified

27`;
28
29function selectSum(selector: string, container: HTMLElement): number {
30 return $$(selector, container).reduce((sum, element) => sum + looseParseInt(element), 0);
31}
32
33const getPositiveReactions = mem((comment: HTMLElement): number | void => {
34 const count = selectSum(positiveReactionsSelector, comment);

Callers 1

Calls 1

looseParseIntFunction · 0.85

Tested by

no test coverage detected