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

immutable-ext

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutable-ext - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

4

index.js

@@ -6,3 +6,5 @@ const Immutable = require('immutable')

fold : function(empty) {
return this.reduce((acc, x) => acc.concat(x), empty)
return empty != null
? this.reduce((acc, x) => acc.concat(x), empty)
: this.reduce((acc, x) => acc.concat(x))
},

@@ -9,0 +11,0 @@ foldMap : function(f, empty) {

{
"name": "immutable-ext",
"version": "1.0.5",
"version": "1.0.6",
"description": "fantasyland compatible extensions",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -84,2 +84,5 @@ const assert = require("assert")

it('works on semigroups (no empty)', () =>
assert.deepEqual(List.of([1,2,3], [4,5,6]).fold(), [1,2,3,4,5,6]))
it('foldMaps the list', () =>

@@ -86,0 +89,0 @@ assert.deepEqual(List.of(1,2,3).foldMap(x => Sum(x), Sum.empty), Sum(6)))

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