content-security-policy-parser
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.0 • Public • Published

    Content Security Policy parser

    Build Status

    Take a Content Security Policy string and parse it.

    Usage:

    const parse = require("content-security-policy-parser");
    
    parse(
      "default-src 'self'; script-src 'unsafe-eval' scripts.com; object-src; style-src styles.biz"
    );
    /*
    {
      'default-src': ["'self'"],
      'script-src': ["'unsafe-eval'", 'scripts.com'],
      'object-src': [],
      'style-src': ['styles.biz']
    }
    */

    This module is considered "complete". I expect to continue maintenance if needed, but I don't plan to add features or make breaking changes.

    Install

    npm i content-security-policy-parser

    DownloadsWeekly Downloads

    9,512

    Version

    0.4.0

    License

    MIT

    Unpacked Size

    4.35 kB

    Total Files

    6

    Last publish

    Collaborators

    • evanhahn