MCPcopy
hub / github.com/microsoft/SandDance / short

Function short

packages/sanddance-explorer/src/controls/dataScope.tsx:34–36  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

32const shortFormat = format('.2~s');
33
34function short(n: number) {
35 return n === -1 ? '--' : n ? (n < 1000 ? n.toString() : shortFormat(n)) : '0';
36}
37
38export function DataScope(props: Props) {
39 const dataCount: DataCount = {

Callers 2

CompactFunction · 0.70
DataScopeButtonFunction · 0.70

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected