Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-diff

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-diff - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

6

diff.js

@@ -644,3 +644,7 @@ /**

if (d[0] !== DIFF_EQUAL) {
if (d == null) {
// Text was deleted from end of original string,
// cursor is now out of bounds in new string
return diffs;
} else if (d[0] !== DIFF_EQUAL) {
// A modification happened at the cursor location.

@@ -647,0 +651,0 @@ // This is the expected outcome, so we can return the original diff.

2

package.json
{
"name": "fast-diff",
"version": "1.1.0",
"version": "1.1.1",
"description": "Fast Javascript text diff",

@@ -5,0 +5,0 @@ "author": "Jason Chen <jhchen7@gmail.com>",

@@ -41,3 +41,3 @@ var _ = require('lodash');

for(var i = 0; i < ITERATIONS; ++i) {
var cursor_pos = Math.floor(random() * strings[i].length);
var cursor_pos = Math.floor(random() * strings[i].length + 1);
var diffs = diff(strings[i], strings[i+1], cursor_pos);

@@ -44,0 +44,0 @@ var patch = googlediff.patch_make(strings[i], strings[i+1], diffs);

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