Huge News!Announcing our $40M Series B led by Abstract Ventures.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 Versions

1
1618

2.0.0

Diff

Changelog

Source

2.0.0

Changed from using a single default export to named exports to support dead-code elimination, aka tree shaking. A number of combinators were renamed in the process and the default import is now an alias for compose that may help to keep notation concise.

Upgrade guide

Now using named exports and default that aliases compose:

-import L from "partial.lenses"
+import P, * as L from "partial.lenses"

Module prefix no longer works as compose:

-L(...)
+P(...) or L.compose(...)

default is a keyword and had to be renamed:

-L.default
+L.defaults

delete is a keyword and had to be renamed:

-L.delete
+L.remove
-L.deleteAll
+L.removeAll
polytypic
published 1.4.1 •

polytypic
published 1.4.0 •

polytypic
published 1.3.1 •

polytypic
published 1.3.0 •

polytypic
published 1.2.0 •

polytypic
published 1.1.2 •

polytypic
published 1.1.1 •

polytypic
published 1.1.0 •

polytypic
published 1.0.0 •

Changelog

Source

11.0.0

Switched the order of arguments to optics so that the first two arguments are now the same as for an ordinary "read-only" function:

- (C, xi2yC, x, i) => ...
+ (x, i, C, xi2yC) => ...

This way it is not necessary to distinguish between optics and read-only functions in the get operation. On V8 based JavaScript engines this gives a significant performance improvement in some operations as taking the length of a function is very expensive in V8. This also means that the behavior of composing optics and ordinary functions is different in the sense that more arguments may be passed to an ordinary function. This change should only affect a very small number of users who have written new optics directly against the internal encoding. In such a case, you will need to switch the order of arguments as shown in the above diff. Also, if you compose optics with ordinary functions that may use more than two arguments, then you will need to limit those functions two arguments.

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