api/NodeRAMStore.js
function checkLimit (limit, keys) {
  if (limit && typeof limit === 'string') limit = +limit;
  if (!limit || Number(limit) !== limit || limit % 1 !== 0 ||
      limit > keys.length)
    limit = keys.length;
  if (limit < 0) limit = 0;
  return limit;
}
function checkLimit (limit, keys) {
  if (limit && typeof limit === 'string') limit = +limit;
  if (!limit || Number(limit) !== limit || limit % 1 !== 0 ||
      limit > keys.length)
    limit = keys.length;
  if (limit < 0) limit = 0;
  return limit;
}
function checkLimit ( limit , keys ) { if ( limit && typeof limit === 'string' ) limit = + limit ; if ( ! limit || Number ( limit ) !== limit || limit % 1 !== 0 || limit > keys . length ) limit = keys . length ; if ( limit < 0 ) limit = 0 ; return limit ; }
Check that the limit parameter is withing range, or set defaults
Check that the limit parameter is withing range or set defaults