Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
prettydiff
Advanced tools
File comparison tool to accurately diff between file versions regardless of comments or minification to the whitespace. It can also beautify (pretty print) and minify HTML.
At the end of the Pretty Diff function include this code: if (typeof exports !== "string") { exports.api = function(x) { "use strict"; return prettydiff(x); }; }
In your Node.js script include Pretty Diff with this code: var prettydiff = require("prettydiff");
Create a WSH script file using XML syntax and with a file extension of "WSF". This file must have a tag for each supported argument, must be capable of reading from a file, and retrieving dependencies. An example for the markup_beauty.js script can be obtained at: http://prettydiff.com/wsh.wsf
That example file would be executed using the following on CLI:
wsh.wsf /source:"my_source_file" /html:true /insize:8
prettydiff.js - primary application for client and server processing api.js - server side API processor (No long maintained) pd.js - DOM interpreter and HTML tool manipulator charDecoder.js - component cleanCSS.js - component csvbeauty.js - component csvmin.js - component diffview.css - component diffview.js - component fulljsmin.js - component js-beautify.js - component markup_beauty.js - component markupmin.js - component
The component files are provided for access to individual functions independent of the Pretty Diff application. The component code is already included in prettydiff.js, so it is not needed in addition to prettydiff.js. The only files not included with prettydiff.js are diffview.css, pd.js, and api.js.
For usage documentation please visit http://prettydiff.com/documentation.php
For code documentation please visit the respective component files. The core files: api.js, pd.js, and prettydiff.js include no code documentation.
@source: http://prettydiff.com/documentation.php
@licstart The following is the entire license notice for the
JavaScript code in this page.
Created by Austin Cheney originally on 3 Mar 2009. This code may not be used or redistributed unless the following conditions are met:
There is no licensing associated with diffview.css. Please use, redistribute, and alter to your content. However, diffview.css provided from Pretty Diff is different from and not aligned with diffview.css originally from Snowtide Informatics.
The use of diffview.js and prettydiff.js must contain the following copyright: Copyright (c) 2007, Snowtide Informatics Systems, Inc. All rights reserved.
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the Snowtide Informatics Systems nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
The fulljsmin.js is used with permission from the author of jsminc.c and such must be stated as: Copyright (c) 2002 Douglas Crockford (www.crockford.com)
The author of js-beautify.js must be stated as: Written by Einars Lielmanis, einars@gmail.com http://elfz.laacz.lv/beautify/
Originally converted to javascript by Vital, vital76@gmail.com http://my.opera.com/Vital/blog/2007/11/21/ javascript-beautify-on-javascript-translated
The code mentioned above has significantly expanded documentation in each of the respective function's external JS file as linked from the documentation page: http://prettydiff.com/documentation.php
The compilation of cssClean, csvbeauty, csvmin, jsmin, jsdifflib, markup_beauty, markupmin, and js-beautify in this manner is a result of the prettydiff() function contained in prettydiff.js. The per character highlighting is the result of the charcomp() function also contained in prettydiff.js. Any use or redistribution of these functions must mention the following: Prettydiff created by Austin Cheney originally on 3 Mar 2009. http://prettydiff.com/
Contact the author at: austin.cheney@us.army.mil
If each and all these conditions are met use and redistribution of prettydiff and its required assets is unlimited without author permission.
@licend The above is the entire license notice
for the JavaScript code in this page.
FAQs
A language aware diff tool.
The npm package prettydiff receives a total of 4,682 weekly downloads. As such, prettydiff popularity was classified as popular.
We found that prettydiff demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.