Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.forEach((v, index) => {
const instance = new unleash.Unleash({
appName: `demo-app-${index % 5}`,
instanceId: `index-${index}`,
url: 'http://localhost:4242/',
refreshIntervall: 4000,
metricsInterval: 10000,
strategies: [
new unleash.Strategy('extra', true),
],
});
instance.on('ready', () => {
console.log('connected to unleash', index);
setInterval(() => {
instance.isEnabled('toggle-1', null, Boolean(Math.round(Math.random() * 2)));