lukaskupczyk/react-hook-consent

View on GitHub
src/core/add-services.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { ConsentOptionsService } from '../Context';
import { addScripts } from './scripts/add';

export function addServices(services: ConsentOptionsService[]) {
    services.forEach(({ id, scripts }) => {
        addScripts(id, scripts);
    });
}