MCPcopy Index your code
hub / github.com/PatrickJS/awesome-cursorrules / parseMinimumAge

Function parseMinimumAge

scripts/check-pr-author.mjs:121–127  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

119}
120
121function parseMinimumAge(value) {
122 const days = Number.parseInt(value, 10);
123 if (!Number.isInteger(days) || days < 0) {
124 throw new Error(`Invalid minimum age: ${value}`);
125 }
126 return days;
127}
128
129function accountAgeDays(createdAt, nowValue) {
130 const createdTime = Date.parse(createdAt);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected