Socket
Socket
Sign inDemoInstall

diff

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diff - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

9

diff.js

@@ -281,2 +281,11 @@ /* See license.txt for terms of usage */

return ret.join("");
},
convertChangesToDMP: function(changes){
var ret = [], change;
for ( var i = 0; i < changes.length; i++) {
change = changes[i];
ret.push([(change.added ? 1 : change.removed ? -1 : 0), change.value]);
}
return ret;
}

@@ -283,0 +292,0 @@ };

2

package.json
{
"name": "diff",
"version": "1.0.2",
"version": "1.0.3",
"description": "A javascript text diff implementation.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -617,1 +617,10 @@ const VERBOSE = false;

};
exports['convertToDMP'] = function() {
diffResult = diff.diffWords("New Value ", "New ValueMoreData ");
assert.deepEqual(
[[0,'New '],[1,'ValueMoreData'],[-1,'Value'],[0,' ']],
diff.convertChangesToDMP(diffResult),
"DMP conversion of diffResult");
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc