MCPcopy Create free account
hub / github.com/dailydotdev/apps / getPercentage

Function getPercentage

packages/shared/src/lib/func.ts:385–390  ·  view source on GitHub ↗
(total: number, part: number)

Source from the content-addressed store, hash-verified

383};
384
385export const getPercentage = (total: number, part: number): number => {
386 if (total === 0) {
387 return 0;
388 }
389 return Math.round((part / total) * 100);
390};
391
392export const getFirstQueryParam = (
393 queryParam: string | string[] | undefined,

Callers 2

OpportunityStepsFunction · 0.90
PollResultsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected