Csp.fromDirectives constructor

Csp.fromDirectives(
  1. Iterable<CspDirective> directives
)

Constructs CSP declaration from CspDirective instances.

Implementation

factory Csp.fromDirectives(Iterable<CspDirective> directives) {
  return Csp.merge(directives.map((e) {
    return Csp.fromMap({e.directiveName: e.arguments});
  }));
}