MCPcopy
hub / github.com/shiyi-0x7f/o-lib / formatWordCount

Function formatWordCount

src/components/WereadBookDetailModal.tsx:113–117  ·  view source on GitHub ↗
(count?: number)

Source from the content-addressed store, hash-verified

111 };
112
113 const formatWordCount = (count?: number) => {
114 if (!count) return null;
115 if (count >= 10000) return `${(count / 10000).toFixed(1)}万字`;
116 return `${count}字`;
117 };
118
119 const formatTime = (ts?: number) => {
120 if (!ts) return "";

Callers 1

WereadBookDetailModalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected