MCPcopy Create free account
hub / github.com/Open-Dev-Society/OpenStock / getChangeColorClass

Function getChangeColorClass

lib/utils.ts:106–109  ·  view source on GitHub ↗
(changePercent?: number)

Source from the content-addressed store, hash-verified

104};
105
106export const getChangeColorClass = (changePercent?: number) => {
107 if (!changePercent) return 'text-gray-400';
108 return changePercent > 0 ? 'text-green-500' : 'text-red-500';
109};
110
111export const formatPrice = (price: number) => {
112 return new Intl.NumberFormat('en-US', {

Callers 1

utils.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected