1.3.1 • Published 5 months ago

csp-toolkit v1.3.1

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
5 months ago

CSP Toolkit

npm version npm downloads npm weekly downloads License GitHub stars

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.

Features

  • 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.

Usage

import {mergePolicies, CSPPolicy, policyToString} from "csp-toolkit"
1.3.1

5 months ago

1.3.0

5 months ago

1.2.1

5 months ago

1.1.1

6 months ago

1.1.0

7 months ago

1.0.0

7 months ago