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

Function getPercentage

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

Source from the content-addressed store, hash-verified

358};
359
360export const getPercentage = (total: number, part: number): number => {
361 if (total === 0) {
362 return 0;
363 }
364 return Math.round((part / total) * 100);
365};
366
367export const getFirstQueryParam = (
368 queryParam: string | string[] | undefined,

Callers 2

OpportunityStepsFunction · 0.90
PollResultsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected