Socket
Socket
Sign inDemoInstall

@frp-ts/lens

Package Overview
Dependencies
3
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-alpha.10 to 1.0.0-alpha.11

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

# [1.0.0-alpha.11](https://github.com/raveclassic/frp-ts/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2022-01-14)
### Features
* **core:** add constructor for `property` & remove interop export ([282abef](https://github.com/raveclassic/frp-ts/commit/282abefa4e38d9cd6b10be2f48ac1c85144345c4))
* **lens:** migrate to new signature ([fa6e5d1](https://github.com/raveclassic/frp-ts/commit/fa6e5d159b47fbe40c303b48ab01a8a08fd4caeb))
# [1.0.0-alpha.10](https://github.com/raveclassic/frp-ts/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2021-12-28)

@@ -8,0 +20,0 @@

4

package.json
{
"name": "@frp-ts/lens",
"version": "1.0.0-alpha.10",
"version": "1.0.0-alpha.11",
"description": "Lenses for frp-ts atoms",

@@ -22,3 +22,3 @@ "typedocMain": "./src/index.ts",

"dependencies": {
"@frp-ts/core": "^1.0.0-alpha.10"
"@frp-ts/core": "^1.0.0-alpha.11"
},

@@ -25,0 +25,0 @@ "devDependencies": {

@@ -11,12 +11,7 @@ "use strict";

const toLensedAtom = (atom) => {
const { set, get, subscribe, modify } = atom;
const { set, get, subscribe } = atom;
const view = (lens) => {
const lensedGet = () => lens.get(get());
const lensedSet = (b) => set(lens.set(b)(get()));
return {
get: lensedGet,
set: lensedSet,
subscribe,
view: (bc) => view(composeLens(lens, bc)),
modify: (...updates) => {
return Object.assign(Object.assign({}, core_1.property.newProperty(lensedGet, subscribe)), { set: lensedSet, view: (bc) => view(composeLens(lens, bc)), modify: (...updates) => {
let value = lensedGet();

@@ -27,12 +22,5 @@ for (const update of updates) {

lensedSet(value);
},
};
} });
};
return {
set,
get,
subscribe,
modify,
view,
};
return Object.assign(Object.assign({}, atom), { view });
};

@@ -39,0 +27,0 @@ exports.toLensedAtom = toLensedAtom;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc