integrations/webVitals/utils/webVitalsUtils
이 콘텐츠는 아직 번역되지 않았습니다.
Functions
Section titled “Functions”calculateClsAverage()
Section titled “calculateClsAverage()”function calculateClsAverage(clsValues: number[]): number
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:10^
Parameters
Section titled “Parameters”clsValues
Section titled “clsValues”number
[]
Returns
Section titled “Returns”number
calculateClsScorePercent()
Section titled “calculateClsScorePercent()”function calculateClsScorePercent(cls: number): number
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:51^
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”number
calculateClsScoreText()
Section titled “calculateClsScoreText()”function calculateClsScoreText(cls: number): string
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:35^
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”string
calculateInpAverage()
Section titled “calculateInpAverage()”function calculateInpAverage(inpValues: number[]): number
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:202^
Parameters
Section titled “Parameters”inpValues
Section titled “inpValues”number
[]
Returns
Section titled “Returns”number
calculateInpScorePercent()
Section titled “calculateInpScorePercent()”function calculateInpScorePercent(inp: number): number
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:243^
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”number
calculateInpScoreText()
Section titled “calculateInpScoreText()”function calculateInpScoreText(inp: number): string
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:227^
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”string
calculateLcpAverage()
Section titled “calculateLcpAverage()”function calculateLcpAverage(lcpValues: number[]): number
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:106^
Parameters
Section titled “Parameters”lcpValues
Section titled “lcpValues”number
[]
Returns
Section titled “Returns”number
calculateLcpScorePercent()
Section titled “calculateLcpScorePercent()”function calculateLcpScorePercent(lcp: number): number
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:147^
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”number
calculateLcpScoreText()
Section titled “calculateLcpScoreText()”function calculateLcpScoreText(lcp: number): string
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:131^
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”string
clsDataAverage()
Section titled “clsDataAverage()”function clsDataAverage(webVitalData: WebVitalsResponseItem[]): number
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:20^
Parameters
Section titled “Parameters”webVitalData
Section titled “webVitalData”Returns
Section titled “Returns”number
clsTextColor()
Section titled “clsTextColor()”function clsTextColor(clsData: number): "green" | "yellow" | "red"
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:93^
Parameters
Section titled “Parameters”clsData
Section titled “clsData”number
Returns
Section titled “Returns”"green"
| "yellow"
| "red"
generateLighthouseFetchUrl()
Section titled “generateLighthouseFetchUrl()”function generateLighthouseFetchUrl(url: string, strategy: "mobile" | "desktop" | "mixed-content"): string
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:298^
Parameters
Section titled “Parameters”string
strategy
Section titled “strategy”"mobile"
| "desktop"
| "mixed-content"
Returns
Section titled “Returns”string
inpDataAverage()
Section titled “inpDataAverage()”function inpDataAverage(webVitalData: WebVitalsResponseItem[]): number
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:212^
Parameters
Section titled “Parameters”webVitalData
Section titled “webVitalData”Returns
Section titled “Returns”number
inpTextColor()
Section titled “inpTextColor()”function inpTextColor(inpData: number): "green" | "yellow" | "red"
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:285^
Parameters
Section titled “Parameters”inpData
Section titled “inpData”number
Returns
Section titled “Returns”"green"
| "yellow"
| "red"
lcpDataAverage()
Section titled “lcpDataAverage()”function lcpDataAverage(webVitalData: WebVitalsResponseItem[]): number
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:116^
Parameters
Section titled “Parameters”webVitalData
Section titled “webVitalData”Returns
Section titled “Returns”number
lcpTextColor()
Section titled “lcpTextColor()”function lcpTextColor(lcpData: number): "green" | "yellow" | "red"
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:189^
Parameters
Section titled “Parameters”lcpData
Section titled “lcpData”number
Returns
Section titled “Returns”"green"
| "yellow"
| "red"
msToSeconds()
Section titled “msToSeconds()”function msToSeconds(ms: number): number
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:4^
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”number
progressBarClsColor()
Section titled “progressBarClsColor()”function progressBarClsColor(clsData: number): "green" | "yellow" | "red"
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:67^
Parameters
Section titled “Parameters”clsData
Section titled “clsData”number
Returns
Section titled “Returns”"green"
| "yellow"
| "red"
progressBarClsTrackColor()
Section titled “progressBarClsTrackColor()”function progressBarClsTrackColor(clsData: number): "yellow" | "red"
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:80^
Parameters
Section titled “Parameters”clsData
Section titled “clsData”number
Returns
Section titled “Returns”"yellow"
| "red"
progressBarInpColor()
Section titled “progressBarInpColor()”function progressBarInpColor(inpData: number): "green" | "yellow" | "red"
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:259^
Parameters
Section titled “Parameters”inpData
Section titled “inpData”number
Returns
Section titled “Returns”"green"
| "yellow"
| "red"
progressBarInpTrackColor()
Section titled “progressBarInpTrackColor()”function progressBarInpTrackColor(inpData: number): "yellow" | "red"
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:272^
Parameters
Section titled “Parameters”inpData
Section titled “inpData”number
Returns
Section titled “Returns”"yellow"
| "red"
progressBarLcpColor()
Section titled “progressBarLcpColor()”function progressBarLcpColor(lcpData: number): "green" | "yellow" | "red"
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:163^
Parameters
Section titled “Parameters”lcpData
Section titled “lcpData”number
Returns
Section titled “Returns”"green"
| "yellow"
| "red"
progressBarLcpTrackColor()
Section titled “progressBarLcpTrackColor()”function progressBarLcpTrackColor(lcpData: number): "yellow" | "red"
Defined in: studiocms/packages/studiocms/src/integrations/webVitals/utils/webVitalsUtils.ts:176^
Parameters
Section titled “Parameters”lcpData
Section titled “lcpData”number
Returns
Section titled “Returns”"yellow"
| "red"