A comprehensive toolkit for working with Content Security Policy (CSP) directives in TypeScript. Provides strongly-typed CSP keys, categorized directives, and utility functions to simplify CSP creation and manipulation.
- Typed CSP Directives: Access categorized CSP directive types, including experimental, official, and navigation directives.
- Utility Functions: Easily generate CSP key-value maps and convert them into string policies.
- Extensible: Designed for flexibility and future expansion.
import {mergePolicies, CSPPolicy, policyToString} from "csp-toolkit"