code: function validateArgs(func, intervalLength, options) {
  
      // Validate "func"
      if (typeof func !== 'function') {
          throw new TypeError('Argument 1, "func", must be a function.')
      }
  
      // Validate "intervalLength"
      if (typeof intervalLength === 'number') {
          if (!Number.isInteger(intervalLength) || intervalLength < 0) {
              throw new TypeError('Argument 2, "intervalLength", must be a non-negative integer or a function that returns a non-negative integer.')
          }
      } else if (typeof intervalLength !== 'function') {
          throw new TypeError('Argument 2, "intervalLength", must be a non-negative integer or a function that returns a non-negative integer.')
      }
  
      // Validate options...
      if (typeof options !== 'object') {
          throw new TypeError('Argument 3, "options", must be an object.')
      }
  
      // Validate passed keys
      const allowedKeys = ['iterations', 'stopOnError']
  
      Object.keys(options).forEach(key => {
          if (!allowedKeys.includes(key)) {
              throw new TypeError('Option "' + key + '" is not a valid option.')
          }
      })
      
      // validate "iterations" option (if passed)
      if (options.hasOwnProperty('iterations')) {
          if (options.iterations !== Infinity && (!Number.isInteger(options.iterations) || options.iterations < 1)) {
              throw new TypeError('Option "iterations" must be Infinity or an integer greater than 0.')
          }
      }
      
      // validate "stopOnError" option (if passed)
      if (options.hasOwnProperty('stopOnError')) {
          if (typeof options.stopOnError !== 'boolean') {
              throw new TypeError('Option "stopOnError" must be a boolean.')
          }
      }
  }
docs: A helper function to validate the arguments passed to interval(...)
  
  @param {*} func
  @param {*} intervalLength
  @param {*} options