MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / validateApplicationInfo

Function validateApplicationInfo

lib/client-options.js:307–322  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

305}
306
307function validateApplicationInfo(options) {
308 function validateString(key) {
309 const str = options[key];
310
311 if (str !== null && str !== undefined && typeof str !== 'string') {
312 throw new TypeError(`${key} should be a String`);
313 }
314 }
315
316 validateString('applicationName');
317 validateString('applicationVersion');
318
319 if (options.id !== null && options.id !== undefined && !(options.id instanceof types.Uuid)) {
320 throw new TypeError('Client id must be a Uuid');
321 }
322}
323
324function validateMonitorReporting(options) {
325 const o = options.monitorReporting;

Callers 1

extendFunction · 0.85

Calls 1

validateStringFunction · 0.85

Tested by

no test coverage detected