Socket
Socket
Sign inDemoInstall

immutable

Package Overview
Dependencies
0
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.6.0 to 3.6.1

10

contrib/cursor/__tests__/Cursor.ts

@@ -197,2 +197,12 @@ ///<reference path='../../../resources/jest.d.ts'/>

it('returns wrapped values for iteration API', () => {
var jsData = [{val: 0}, {val: 1}, {val: 2}];
var data = Immutable.fromJS(jsData);
var cursor = Cursor.from(data);
cursor.forEach(function (c, i) {
expect(typeof c.deref).toBe('function'); // is a cursor!
expect(c.get('val')).toBe(i);
});
});
it('can map over values to get subcursors', () => {

@@ -199,0 +209,0 @@ var data = Immutable.fromJS({a: {v: 1}, b: {v: 2}, c: {v: 3}});

4

contrib/cursor/index.js

@@ -257,3 +257,3 @@ /**

cursor._rootData,
newKeyPath(keyPath, changeKey)
arguments.length > 2 ? newKeyPath(keyPath, changeKey) : keyPath
);

@@ -267,5 +267,5 @@ if (result !== undefined) {

function newKeyPath(head, tail) {
return tail ? Seq(head).concat(tail).toArray() : head;
return Seq(head).concat(tail).toArray();
}
exports.from = cursorFrom;
{
"name": "immutable",
"version": "3.6.0",
"version": "3.6.1",
"description": "Immutable Data Collections",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/facebook/immutable-js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc