Nietzsche's Preposterous Moustache

    jstransformer-cdata-js

    1.0.0 • Public • Published

    jstransformer-cdata-js

    Transformer that converts a JavaScript string to an XML CDATA.

    Build Status Coverage Status Dependency Status NPM version

    Installation

    npm install jstransformer-cdata-js
    

    API

    var cdata = require('jstransformer')(require('jstransformer-cdata-js'))
     
    cdata.render('"hello world"').body
    // <![CDATA[
    // "hello world"
    // //]]>
     
    // ']]>' is properly escaped:
    cdata.render('var str = "<[[goodbye world]]>"').body
    // <![CDATA[
    // var str = "<[[goodbye world]]]]><![CDATA[>"
    // //]]>

    License

    MIT

    Install

    npm i jstransformer-cdata-js

    DownloadsWeekly Downloads

    211

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • calebeby
    • forbeslindesay
    • hemanth
    • robloach
    • stoeffel
    • timothygu