jstransformer-cdata
Advanced tools
+22
| # 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 |
+21
| # 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" | ||
| } |
+6
-5
@@ -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. | ||
| [](https://travis-ci.org/jstransformers/jstransformer-cdata) | ||
| [](https://coveralls.io/r/jstransformers/jstransformer-cdata?branch=master) | ||
| [](https://www.npmjs.org/package/jstransformer-cdata) | ||
| [](https://travis-ci.org/jstransformers/jstransformer-foo) | ||
| [](https://coveralls.io/r/jstransformers/jstransformer-foo?branch=master) | ||
| [](http://david-dm.org/jstransformers/jstransformer-foo) | ||
| [](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 |
-17
| # 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 |
-24
| 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]]> |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
-50%1
-50%30
3.45%0
-100%3335
-31.56%5
-58.33%8
-80.95%1
Infinity%