New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nteract/commutable

Package Overview
Dependencies
Maintainers
15
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nteract/commutable - npm Package Compare versions

Comparing version 7.0.1 to 7.0.2

6

__tests__/primitive.spec.ts

@@ -18,3 +18,3 @@ import { remultiline } from "../src/primitives";

expect(remultiline("test\n\n\nthis\n\nout").map(flagNewlines)).toEqual(
["test\n", "\n\n", "this\n", "\nout"].map(flagNewlines)
["test\n", "\n", "\n", "this\n", "\n", "out"].map(flagNewlines)
);

@@ -25,5 +25,3 @@

).toEqual(
// This shows the super weird case with ours which is a bunch of
// newlines before the last line...
["test\n", "\n\n", "this\n", "\n", "out\n", "\n\n\n\n\nwhat"].map(
["test\n", "\n", "\n", "this\n", "\n", "out\n", "\n", "\n", "\n", "\n", "\n", "what"].map(
flagNewlines

@@ -30,0 +28,0 @@ )

@@ -30,4 +30,4 @@ "use strict";

}
// Use positive lookahead regex to split on newline and retain newline char
return s.split(/(.+?(?:\r\n|\n))/g).filter(x => x !== "");
// Split on newline and retain newline char
return s.split(/(.*?(?:\r\n|\n))/g).filter(x => x !== "");
}

@@ -34,0 +34,0 @@ exports.remultiline = remultiline;

{
"name": "@nteract/commutable",
"version": "7.0.1",
"version": "7.0.2",
"description": "library for immutable notebook operations",

@@ -27,3 +27,3 @@ "main": "lib/index.js",

},
"gitHead": "9f53f825b6d7920780490143c2dad53675248b12"
"gitHead": "dec904e957590ef262d81e8ef567852864a27a54"
}

@@ -118,4 +118,4 @@ /**

}
// Use positive lookahead regex to split on newline and retain newline char
return s.split(/(.+?(?:\r\n|\n))/g).filter(x => x !== "");
// Split on newline and retain newline char
return s.split(/(.*?(?:\r\n|\n))/g).filter(x => x !== "");
}

@@ -122,0 +122,0 @@

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