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.1.2 to 1.1.3

package-lock.json

11

index.js

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

return this.reduce((ys, x) =>
f(x).map(x => y => y.concat([x])).ap(ys), point(this.empty))
ys.map(x => y => x.concat([y])).ap(f(x)), point(this.empty))
}

@@ -46,2 +46,6 @@

// comonad#extend - extract needs list to be non empty
List.prototype.extend = function(f) {
return this.map((x, i) => f(this.slice(0, i+1)))
}

@@ -77,2 +81,7 @@

// comonad#extend - extract needs to be paired with a key
Map.prototype.extend = function(f) {
return this.map(_value => f(this))
}
module.exports = Immutable

16

package.json
{
"name": "immutable-ext",
"version": "1.1.2",
"version": "1.1.3",
"description": "fantasyland compatible extensions",
"main": "index.js",
"main": "dist/index.js",
"repository": {
"type": "git",
"url": "https://github.com/npm/npm.git"
},
"engines": {

@@ -16,9 +20,13 @@ "node": ">=6.2.0"

"devDependencies": {
"immutable": "*",
"babel-cli": "^6.24.1",
"babel-preset-es2015": "^6.24.1",
"daggy": "^0.0.1",
"fantasy-identities": "^0.0.1",
"immutable": "*",
"mocha": "^2.4.5"
},
"scripts": {
"test": "mocha --watch test/**.js"
"test": "mocha --watch test/**.js",
"compile": "babel --presets es2015 -d dist/ ./index.js",
"prepublish": "npm run compile"
},

@@ -25,0 +33,0 @@ "keywords": [

@@ -58,2 +58,6 @@ const assert = require("assert")

Identity.of(Map({a: 2, b: 3}))))
it('extends the map', () =>{
assert.deepEqual(Map({a: 1, b: 2}).extend(m => m.get('a') + m.get('b')), Map({a: 3, b: 3}))
})
})

@@ -90,3 +94,7 @@

assert.deepEqual(List.of(1,2,3).foldMap(x => Sum(x), Sum.empty), Sum(6)))
it('extends the list', () =>
assert.deepEqual(List.of(1,2,3).extend(xs => xs.foldMap(x => Sum(x), Sum.empty).val), List.of(1, 3, 6))
)
})

Sorry, the diff of this file is not supported yet

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