MCPcopy
hub / github.com/MauriceNino/dashdot / numNull

Function numNull

apps/server/src/config.ts:3–8  ·  view source on GitHub ↗
(val: string | undefined)

Source from the content-addressed store, hash-verified

1import type { Config } from '@dashdot/common';
2
3const numNull = (val: string | undefined): number | undefined => {
4 if (val === undefined || val === '') {
5 return undefined;
6 }
7 return +val;
8};
9
10const penv = (key: string): string | undefined => process.env[`DASHDOT_${key}`];
11const lst = (item: string): string[] => (item === '' ? [] : item.split(','));

Callers 2

kvFunction · 0.85
config.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected