all files / kayn/dist/lib/Utils/ ParameterHelper.js

75% Statements 6/8
28.57% Branches 2/7
33.33% Functions 1/3
75% Lines 6/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20                           
'use strict';
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
var isKeyValid = function isKeyValid(key) {
  return key && typeof key === 'string';
};
var areLimitsValid = function areLimitsValid(limits) {
  return limits && Array.isArray(limits) && limits.every(function (limit) {
    return typeof limit.count === 'number' && typeof limit.per === 'number';
  });
};
 
var ParameterHelper = {
  isKeyValid: isKeyValid,
  areLimitsValid: areLimitsValid
};
 
exports.default = ParameterHelper;