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

Function getPercentage

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

Source from the content-addressed store, hash-verified

395};
396
397export const getPercentage = (total: number, part: number): number => {
398 if (total === 0) {
399 return 0;
400 }
401 return Math.round((part / total) * 100);
402};
403
404export const getFirstQueryParam = (
405 queryParam: string | string[] | undefined,

Callers 2

OpportunityStepsFunction · 0.90
PollResultsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected