https://github.com/jstransformers/jstransformer-cdata
Transform a string to an XML CDATA.
https://github.com/jstransformers/jstransformer-cdata
Last synced: 11 months ago
JSON representation
Transform a string to an XML CDATA.
- Host: GitHub
- URL: https://github.com/jstransformers/jstransformer-cdata
- Owner: jstransformers
- License: mit
- Created: 2015-02-15T23:32:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-26T03:21:55.000Z (about 6 years ago)
- Last Synced: 2024-11-14T10:40:57.991Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://npmjs.com/jstransformer-cdata
- Size: 50.8 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE.md
Awesome Lists containing this project
README
# jstransformer-cdata
[JSTransformer](http://github.com/jstransformers) that converts a string to an XML CDATA.
[](https://travis-ci.org/jstransformers/jstransformer-cdata)
[](https://codecov.io/gh/jstransformers/jstransformer-cdata)
[](http://david-dm.org/jstransformers/jstransformer-cdata)
[](https://www.npmjs.org/package/jstransformer-cdata)
## Installation
npm install jstransformer-cdata
## API
```js
var cdata = require('jstransformer')(require('jstransformer-cdata'))
cdata.render('hello world').body
//=> ''
// ']]>' is properly escaped
cdata.render('<[[goodbye world]]>').body
//=> ']]>'
```
## License
MIT