Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

jstransformer-cdata

Package Overview
Dependencies
Maintainers
6
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jstransformer-cdata - npm Package Compare versions

Comparing version
0.0.3
to
1.0.0
+22
HISTORY.md
# Changelog
## v1.0.0: 2015-08-04
- No changes
- Stable release
## v0.0.3: 2015-03-29
- Use `'html'` as output format
## v0.0.2: 2015-02-15
- Fix README again
## v0.0.1: 2015-02-15
- Fix README
## v0.0.0: 2015-02-15
- Initial release
# The MIT License (MIT)
Copyright (c) 2015 [JSTransformers Team](https://github.com/orgs/jstransformers/people)
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.
+11
-7
{
"name": "jstransformer-cdata",
"version": "0.0.3",
"version": "1.0.0",
"description": "A transformer that transforms a string into XML CDATA.",

@@ -10,10 +10,11 @@ "keywords": [

],
"files": [
"index.js"
],
"devDependencies": {
"coveralls": "^2.11.2",
"istanbul": "^0.3.5"
"test-jstransformer": "^1.0.0"
},
"scripts": {
"test": "node test",
"coverage": "istanbul cover test",
"coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls"
"test": "test-jstransformer",
"coverage": "test-jstransformer coverage"
},

@@ -24,4 +25,7 @@ "repository": {

},
"author": "Timothy Gu <timothygu99@gmail.com>",
"author": {
"name": "JSTransformers Team",
"url": "http://github.com/orgs/jstransformers/people"
},
"license": "MIT"
}

@@ -1,8 +0,9 @@

# jstransformer-cdata
# jstransformer-foo
Transformer that converts a string to an XML CDATA.
[JSTransformer](http://github.com/jstransformers) that converts a string to an XML CDATA.
[![Build Status](https://img.shields.io/travis/jstransformers/jstransformer-cdata/master.svg)](https://travis-ci.org/jstransformers/jstransformer-cdata)
[![Coverage Status](https://img.shields.io/coveralls/jstransformers/jstransformer-cdata/master.svg)](https://coveralls.io/r/jstransformers/jstransformer-cdata?branch=master)
[![NPM version](https://img.shields.io/npm/v/jstransformer-cdata.svg)](https://www.npmjs.org/package/jstransformer-cdata)
[![Build Status](https://img.shields.io/travis/jstransformers/jstransformer-cdata/master.svg)](https://travis-ci.org/jstransformers/jstransformer-foo)
[![Coverage Status](https://img.shields.io/coveralls/jstransformers/jstransformer-cdata/master.svg)](https://coveralls.io/r/jstransformers/jstransformer-foo?branch=master)
[![Dependency Status](https://img.shields.io/david/jstransformers/jstransformer-cdata/master.svg)](http://david-dm.org/jstransformers/jstransformer-foo)
[![NPM version](https://img.shields.io/npm/v/jstransformer-cdata.svg)](https://www.npmjs.org/package/jstransformer-foo)

@@ -9,0 +10,0 @@ ## Installation

Sorry, the diff of this file is not supported yet

language: node_js
sudo: false
node_js:
- "0.10"
- "0.12"
- "1.2"
after_success: npm run coveralls
# Changelog
## v0.0.3: 2015-03-29
- Use `'html'` as output format
## v0.0.2: 2015-02-15
- Fix README again
## v0.0.1: 2015-02-15
- Fix README
## v0.0.0: 2015-02-15
- Initial release
The MIT License (MIT)
Copyright (c) 2013 Forbes Lindesay
Copyright (c) 2013 John Papandriopoulos
Copyright (c) 2015 Tiancheng "Timothy" Gu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
<![CDATA[hello world]]>
<![CDATA[<[[goodbye world]]]]><![CDATA[>]]>
'use strict';
var assert = require('assert');
var fs = require('fs');
var join = require('path').join;
var transform = require('../');
var output;
var failed = false;
function assertEqual(output, expected) {
console.log('\tOutput:', JSON.stringify(output));
console.log('\tExpected:', JSON.stringify(expected));
if (output !== expected) {
console.log('\tFAILED');
failed = true;
} else {
console.log('\tPASSED');
}
}
function test(file, desc) {
file = join(__dirname, 'THING-' + file + '.txt');
var input = fs.readFileSync(file.replace('THING', 'sample'), 'utf8');
var expected = fs.readFileSync(file.replace('THING', 'expected'), 'utf8');
try {
console.log('\n' + desc + ':');
output = transform.render(input);
assertEqual(output, expected);
} catch (e) {
failed = true;
console.error(e.stack);
}
}
test('a', 'Regular input');
test('b', 'Input with `]]>`');
console.log('\nTests ' + (failed ? 'FAILED' : 'PASSED'));
if (failed) process.exit(1);
hello world
<[[goodbye world]]>