Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
delete args.logLevel
}
// prevent secret API key to be included in browser environments
if (runtime.isBrowser && args.secretApiKey) {
log.error('The secret API key is not supposed to be used in browser environments!\nPlease see https://3d.io/docs/api/1/get-started-browser.html#secret-api-key for more information.')
}
// simply copy over the other configs
var key, keys = Object.keys(args)
for (var i = 0, l = keys.length; i < l; i++) {
key = keys[i]
if (defaults[key] !== undefined) {
configs[key] = args[key]
} else {
log.warn('Unknown config param "' + key + '". Available params are: ' + Object.keys(defaults).join(', '))
}
}
return this
}