Have ideas to improve npm?Join in the discussion! »

    rehype-minify-json-script

    2.0.2 • Public • Published

    rehype-minify-json-script

    Build Coverage Downloads Size Sponsors Backers Chat

    Minify script elements with a JSON body.

    Install

    npm:

    npm install rehype-minify-json-script

    Example

    In
    <script type="application/ld+json">
    {
      "@context": {
        "name": "http://xmlns.com/foaf/0.1/name",
        "@id": "http://me.example.com",
        "@type": "Person",
        "name": "John Smith",
        "homepage": "http://www.example.com/"
      }
    }
    </script> 
    Out
    <script type="application/ld+json">{"@context":{"name":"John Smith","@id":"http://me.example.com","@type":"Person","homepage":"http://www.example.com/"}}</script> 

    Contribute

    See contributing.md in rehypejs/.github for ways to get started. See support.md for ways to get help.

    This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

    License

    MIT © Titus Wormer

    Install

    npm i rehype-minify-json-script

    DownloadsWeekly Downloads

    295

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    4.44 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar
    • avatar