UNPKG

@bc443e/mongoose-diff-history

Version:

Manage Mongo Collection diff History and versions. Forked from mongoose-diff-history

14 lines (10 loc) 212 B
function positiveInt(value) { const parsedInt = parseInt(value, 10); if (isNaN(parsedInt) || parsedInt <= 0) { return false; } return parsedInt; } module.exports = { positiveInt };