Socket
Book a DemoInstallSign in
Socket

jstransformer-cdata-js

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jstransformer-cdata-js

JSTransformer that transforms a JavaScript string into XML CDATA.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
18
-70.97%
Maintainers
6
Weekly downloads
 
Created
Source

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

Keywords

jstransformer

FAQs

Package last updated on 04 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts