MCPcopy
hub / github.com/chartbrew/chartbrew / parsePositiveInt

Function parsePositiveInt

server/redisConnection.js:51–58  ·  view source on GitHub ↗
(value, fallback)

Source from the content-addressed store, hash-verified

49};
50
51const parsePositiveInt = (value, fallback) => {
52 const parsedValue = parseInt(value, 10);
53 if (Number.isNaN(parsedValue) || parsedValue <= 0) {
54 return fallback;
55 }
56
57 return parsedValue;
58};
59
60const getRedisClusterOptions = (overridePrefix = null) => {
61 const clusterNodes = getRedisEnvValue("CLUSTER_NODES", overridePrefix);

Callers 1

getQueueOptionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected