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

partial.lenses

Package Overview
Dependencies
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

partial.lenses - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

10

lib/partial.lenses.js

@@ -220,5 +220,9 @@ "use strict";

if (y === undefined) return undefined;
var z = {};
var z = undefined;
var set = function set(k, v) {
if (undefined === z) z = {};
z[k] = v;
};
for (var k in y) {
if (!(k in template)) z[k] = y[k];else if (k in c) z[k] = c[k];
if (!(k in template)) set(k, y[k]);else if (k in c) set(k, c[k]);
}

@@ -230,2 +234,2 @@ return z;

exports.default = L;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wYXJ0aWFsLmxlbnNlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUlBLElBQU0sWUFBWSxTQUFaLFNBQVksQ0FBQyxDQUFELEVBQUksQ0FBSixFQUFVO0FBQzFCLE1BQUksTUFBTSxTQUFOLElBQW1CLEVBQUUsS0FBSyxDQUFMLENBQUYsRUFDckIsT0FBTyxDQUFQLENBREY7QUFFQSxNQUFJLGFBQUosQ0FIMEI7QUFJMUIsT0FBSyxJQUFNLENBQU4sSUFBVyxDQUFoQixFQUFtQjtBQUNqQixRQUFJLE1BQU0sQ0FBTixFQUFTO0FBQ1gsVUFBSSxjQUFjLENBQWQsRUFDRixJQUFJLEVBQUosQ0FERjtBQUVBLFFBQUUsQ0FBRixJQUFPLEVBQUUsQ0FBRixDQUFQLENBSFc7S0FBYjtHQURGO0FBT0EsU0FBTyxDQUFQLENBWDBCO0NBQVY7O0FBY2xCLElBQU0sU0FBUyxTQUFULE1BQVMsQ0FBQyxDQUFELEVBQUksQ0FBSixFQUFPLENBQVAsRUFB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W2tdKVxuICAgIH1cbiAgICByZXR1cm4gelxuICB9KSlcblxuZXhwb3J0IGRlZmF1bHQgTFxuIl19
{
"name": "partial.lenses",
"version": "1.1.0",
"version": "1.1.1",
"description": "Ramda compatible lenses",

@@ -14,3 +14,3 @@ "main": "lib/partial.lenses.js",

"type": "git",
"url": "git+https://github.com/dirty-js/partial.lenses.git"
"url": "git+https://github.com/calmm-js/partial.lenses.git"
},

@@ -25,5 +25,5 @@ "keywords": [

"bugs": {
"url": "https://github.com/dirty-js/partial.lenses/issues"
"url": "https://github.com/calmm-js/partial.lenses/issues"
},
"homepage": "https://github.com/dirty-js/partial.lenses#readme",
"homepage": "https://github.com/calmm-js/partial.lenses#readme",
"dependencies": {

@@ -30,0 +30,0 @@ "ramda": "^0.19.1"

@@ -16,3 +16,3 @@ [ [Tutorial](#tutorial) | [Reference](#reference) | [Background](#background) ]

[![npm version](https://badge.fury.io/js/partial.lenses.svg)](http://badge.fury.io/js/partial.lenses) [![](https://david-dm.org/dirty-js/partial.lenses.svg)](https://david-dm.org/dirty-js/partial.lenses)
[![npm version](https://badge.fury.io/js/partial.lenses.svg)](http://badge.fury.io/js/partial.lenses) [![](https://david-dm.org/calmm-js/partial.lenses.svg)](https://david-dm.org/calmm-js/partial.lenses)

@@ -19,0 +19,0 @@ ## Tutorial

@@ -141,9 +141,14 @@ import R from "ramda"

return undefined
const z = {}
let z
const set = (k, v) => {
if (undefined === z)
z = {}
z[k] = v
}
for (const k in y) {
if (!(k in template))
z[k] = y[k]
set(k, y[k])
else
if (k in c)
z[k] = c[k]
set(k, c[k])
}

@@ -150,0 +155,0 @@ return z

@@ -140,2 +140,3 @@ import R from "ramda"

testEq('L.set(L.augment({y: c => c.x+1}), {x: 2, y: 1}, {x: 0, y: -1})', {x: 2, y: -1})
testEq('L.delete(L(L.augment({y: () => 1}), "x"), {x:0})', undefined)
})
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