Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Optional = require('optional-js');
const { validateMetric } = require('measured-core').metricValidators;
/**
* This module contains various validators to validate publicly exposed input.
*
* @module inputValidators
*/
module.exports = {
/**
* Validates @{link Gauge} options.
*
* @param {string} name The metric name
* @param {function} callback The callback for the Gauge
* @param {Dimensions} dimensions The optional custom dimensions
* @param {number} publishingIntervalInSeconds the optional publishing interval
*/
validateGaugeOptions: (name, callback, dimensions, publishingIntervalInSeconds) => {