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.1 to 1.1.2

.travis.yml

6

lib/partial.lenses.js

@@ -26,3 +26,3 @@ "use strict";

if (o === undefined || !(k in o)) return o;
var r = undefined;
var r = void 0;
for (var p in o) {

@@ -221,3 +221,3 @@ if (p !== k) {

if (y === undefined) return undefined;
var z = undefined;
var z = void 0;
var set = function set(k, v) {

@@ -235,2 +235,2 @@ if (undefined === z) z = {};

exports.default = L;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wYXJ0aWFsLmxlbnNlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUlBLElBQU0sWUFBWSxTQUFaLFNBQVksQ0FBQyxDQUFELEVBQUksQ0FBSixFQUFVO0FBQzFCLE1BQUksTUFBTSxTQUFOLElBQW1CLEVBQUUsS0FBSyxDQUFMLENBQUYsRUFDckIsT0FBTyxDQUFQLENBREY7QUFFQSxNQUFJLGFBQUosQ0FIMEI7QUFJMUIsT0FBSyxJQUFNLENBQU4sSUFBVyxDQUFoQixFQUFtQjtBQUNqQixRQUFJLE1BQU0sQ0FBTixFQUFTO0FBQ1gsVUFBSSxjQUFjLENBQWQsRUFDRixJQUFJLEVBQUosQ0FERjtBQUVBLFFBQUUsQ0FBRixJQUFPLEVBQUUsQ0FBRixDQUFQLENBSFc7S0FBYjtHQURGO0FBT0EsU0FBTyxDQUFQLENBWDBCO0NBQVY7O0FBY2xCLElBQU0sU0FBUyxTQUFULE1BQVMsQ0FBQyxDQUFELEVBQUksQ0FBSixFQUFPLENBQVAsRUFBYTtBQUMxQixNQUFJLE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gKGssIHYpID0+IHtcbiAgICAgIGlmICh1bmRlZmluZWQgPT09IHopXG4gICAgICAgIHogPSB7fVxuICAgICAgeltrXSA9IHZcbiAgICB9XG4gICAgZm9yIChjb25zdCBrIGluIHkpIHtcbiAgICAgIGlmICghKGsgaW4gdGVtcGxhdGUpKVxuICAgICAgICBzZXQoaywgeVtrXSlcbiAgICAgIGVsc2VcbiAgICAgICAgaWYgKGsgaW4gYylcbiAgICAgICAgICBzZXQoaywgY1trXSlcbiAgICB9XG4gICAgcmV0dXJuIHpcbiAgfSkpXG5cbmV4cG9ydCBkZWZhdWx0IExcbiJdfQ==
{
"name": "partial.lenses",
"version": "1.1.1",
"description": "Ramda compatible lenses",
"version": "1.1.2",
"description": "Ramda compatible partial lenses",
"main": "lib/partial.lenses.js",

@@ -32,10 +32,10 @@ "scripts": {

"babel": "^6.5.2",
"babel-cli": "^6.5.1",
"babel-cli": "^6.6.5",
"babel-eslint": "^5.0.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.5.2",
"babel-preset-es2015": "^6.5.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.7.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-stage-2": "^6.5.0",
"eslint": "^2.2.0",
"eslint": "2.2.x",
"mocha": "^2.4.5"
}
}

@@ -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/calmm-js/partial.lenses.svg)](https://david-dm.org/calmm-js/partial.lenses)
[![npm version](https://badge.fury.io/js/partial.lenses.svg)](http://badge.fury.io/js/partial.lenses) [![Build Status](https://travis-ci.org/calmm-js/partial.lenses.svg?branch=master)](https://travis-ci.org/calmm-js/partial.lenses) [![](https://david-dm.org/calmm-js/partial.lenses.svg)](https://david-dm.org/calmm-js/partial.lenses) [![](https://david-dm.org/calmm-js/partial.lenses/dev-status.svg)](https://david-dm.org/calmm-js/partial.lenses#info=devDependencies) [![Gitter](https://img.shields.io/gitter/room/calmm-js/chat.js.svg?style=flat-square)](https://gitter.im/calmm-js)

@@ -225,14 +225,27 @@ ## Tutorial

* `L(l, ...ls)` and `L.compose(l, ...ls)` both are the same as
`R.compose(lift(l), ...ls.map(lift))` (see
[compose](http://ramdajs.com/0.19.0/docs/#compose)).
* `L.lens(get, set)` is the same as `R.lens(get, set)` (see
[lens](http://ramdajs.com/0.19.0/docs/#lens)).
* `L.over(l, x2x, s)` is the same as `R.over(lift(l), x2x, s)` (see
[over](http://ramdajs.com/0.19.0/docs/#over)).
* `L.set(l, x, s)` is the same as `R.set(lift(l), x, s)` (see
[set](http://ramdajs.com/0.19.0/docs/#set)).
* `L.view(l, s)` is the same as `R.view(lift(l), s)` (see
[view](http://ramdajs.com/0.19.0/docs/#view)).
#### [`L.compose(l, ...ls)`](#lcomposel-ls "L.compose :: (PLens s s1, ...PLens sN a) -> PLens s a")
`L(l, ...ls)` and `L.compose(l, ...ls)` both are the same as `R.compose(lift(l),
...ls.map(lift))` (see [compose](http://ramdajs.com/0.19.0/docs/#compose)).
#### [`L.lens(get, set)`](#llensget-set "L.lens :: (Maybe s -> Maybe a) -> (Maybe a -> Maybe s -> Maybe s) -> PLens s a")
`L.lens(get, set)` is the same as `R.lens(get, set)` (see
[lens](http://ramdajs.com/0.19.0/docs/#lens)).
#### [`L.over(l, x2x, s)`](#loverl-x2x-s "L.over :: PLens s a -> (Maybe a -> Maybe a) -> Maybe s -> Maybe s")
`L.over(l, x2x, s)` is the same as `R.over(lift(l), x2x, s)` (see
[over](http://ramdajs.com/0.19.0/docs/#over)).
#### [`L.set(l, x, s)`](#lsetl-x-s "L.set :: PLens s a -> Maybe a -> Maybe s -> Maybe s")
`L.set(l, x, s)` is the same as `R.set(lift(l), x, s)` (see
[set](http://ramdajs.com/0.19.0/docs/#set)).
#### [`L.view(l, s)`](#lviewl-s "L.view :: PLens s a -> Maybe s -> Maybe a")
`L.view(l, s)` is the same as `R.view(lift(l), s)` (see
[view](http://ramdajs.com/0.19.0/docs/#view)).
#### Lifting

@@ -255,3 +268,3 @@

#### L.delete(l, s)
#### [`L.delete(l, s)`](#ldeletel-s "L.delete :: PLens s a -> Maybe s -> Maybe s")

@@ -262,3 +275,3 @@ For convenience, there is also a shorthand for delete:

#### L.deleteAll(l, s)
#### [`L.deleteAll(l, s)`](#ldeletealll-s "L.deleteAll :: PLens s a -> Maybe s -> Maybe s")

@@ -274,3 +287,3 @@ `L.deleteAll(l, s)` deletes all the non `undefined` items targeted by the lens

#### L.append
#### [`L.append`](#lappend "L.append :: PLens [a] a")

@@ -282,3 +295,3 @@ `L.append` is a special lens that operates on arrays. The view of `L.append` is

#### L.augment({prop: obj => val, ...props})
#### [`L.augment({prop: obj => val, ...props})`](#laugmentprop-obj--val-props "L.augment :: {p1 :: o -> a1, ...ps} -> PLens {...o} {...o, p1 :: a1, ...ps}")

@@ -291,18 +304,10 @@ `L.augment({prop: obj => val, ...props})` is given a template of functions to

#### L.choose(maybeValue => PartialLens)
#### [`L.choose(maybeValue => PLens)`](#lchoosemaybevalue--plens "L.choose :: (Maybe s -> PLens s a) -> PLens s a")
`L.choose(maybeValue => PartialLens)` creates a lens whose operation is
determined by the given function that maps the underlying view, which can be
undefined, to a lens. The lens returned by the given function will be lifted.
`L.choose(maybeValue => PLens)` creates a lens whose operation is determined by
the given function that maps the underlying view, which can be undefined, to a
lens. The lens returned by the given function will be lifted.
Note that the type of `L.choose` is
#### [`L.filter(predicate)`](#lfilterpredicate "L.filter :: (a -> Boolean) -> PLens [a] [a]")
```haskell
choose :: (Maybe a -> PartialLens s b) -> PartialLens s a -> PartialLens s b
```
which is very similar to the type of a monadic bind operation.
#### L.filter(predicate)
`L.filter(predicate)` operates on arrays. When viewed, only elements matching

@@ -321,3 +326,3 @@ the given predicate will be returned. When set, the resulting array will be

#### L.find(value => boolean)
#### [`L.find(value => boolean)`](#lfindvalue--boolean "L.find :: (a -> Boolean) -> PLens [a] a")

@@ -329,3 +334,3 @@ `L.find(value => boolean)` operates on arrays like `L.index`, but the index to

#### L.findWith(l, ...ls)
#### [`L.findWith(l, ...ls)`](#lfindwithl-ls "L.findWith :: (PLens s s1, ...PLens sN a) -> PLens [s] a")

@@ -345,3 +350,3 @@ `L.findWith(l, ...ls)` is defined as

#### L.firstOf(l, ...ls)
#### [`L.firstOf(l, ...ls)`](#lfirstofl-ls "L.firstOf :: (PLens s a, ...PLens s a) -> PLens s a")

@@ -356,5 +361,4 @@ `L.firstOf(l, ...ls)` returns a partial lens that acts like the first of the

#### [`L.index(integer)`](#lindexinteger "L.index :: Integer -> PLens [a] a")
#### L.index(integer)
`L.index(integer)` or `L(integer)` is similar to `R.lensIndex(integer)` (see

@@ -370,3 +374,3 @@ [lensIndex](http://ramdajs.com/0.19.0/docs/#lensIndex)), but acts as a partial

#### L.normalize(value => value)
#### [`L.normalize(value => value)`](#lnormalizevalue--value "L.normalize :: (s -> s) -> PLens s s")

@@ -386,3 +390,3 @@ `L.normalize(value => value)` maps the value with same given transform when

#### L.prop(string)
#### [`L.prop(string)`](#lpropstring "L.prop :: (p :: a) -> PLens {p :: a, ...ps} a")

@@ -397,3 +401,3 @@ `L.prop(string)` or `L(string)` is similar to `R.lensProp(string)` (see

#### L.replace(inn, out)
#### [`L.replace(inn, out)`](#lreplaceinn-out "L.replace :: Maybe s -> Maybe s -> PLens s s")

@@ -408,11 +412,11 @@ `L.replace(inn, out)`, when viewed, replaces the value `inn` with `out` and vice

##### L.default(out)
##### [`L.default(out)`](#ldefaultout "L.default :: s -> PLens s s")
`L.default(out)` is the same as `L.replace(undefined, out)`.
##### L.define(value)
##### [`L.define(value)`](#ldefinevalue "L.define :: s -> PLens s s")
`L.define(value)` is the same as `L(L.required(value), L.default(value))`.
##### L.required(inn)
##### [`L.required(inn)`](#lrequiredinn "L.required :: s -> PLens s s")

@@ -461,3 +465,3 @@ `L.required(inn)` is the same as `L.replace(inn, undefined)`.

```haskell
type PartialLens s a = (s -> Maybe a, Maybe a -> s -> s)
type PLens s a = (Maybe s -> Maybe a, Maybe a -> Maybe s -> Maybe s)
```

@@ -468,3 +472,3 @@

```haskell
type PartialLens s a = Lens s (Maybe a)
type PLens s a = Lens (Maybe s) (Maybe a)
```

@@ -471,0 +475,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