partial.lenses
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.props = exports.identity = exports.pick = exports.augment = exports.filter = exports.append = exports.index = exports.findWith = exports.find = exports.prop = exports.normalize = exports.define = exports.required = exports.defaults = exports.replace = exports.choice = exports.orElse = exports.nothing = exports.choose = exports.just = exports.chain = exports.get = exports.set = exports.modify = exports.lens = exports.removeAll = exports.remove = exports.compose = exports.toRamda = exports.fromRamda = undefined; | ||
exports.log = exports.props = exports.identity = exports.pick = exports.augment = exports.filter = exports.append = exports.index = exports.findWith = exports.find = exports.prop = exports.normalize = exports.define = exports.required = exports.defaults = exports.replace = exports.choice = exports.orElse = exports.nothing = exports.choose = exports.just = exports.chain = exports.get = exports.set = exports.modify = exports.lens = exports.removeAll = exports.remove = exports.compose = exports.toRamda = exports.fromRamda = undefined; | ||
@@ -314,3 +314,23 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var show = function show() { | ||
for (var _len4 = arguments.length, labels = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { | ||
labels[_key4] = arguments[_key4]; | ||
} | ||
return function (x) { | ||
var _console; | ||
return (_console = console).log.apply(_console, labels.concat([x])) || x; | ||
}; | ||
}; | ||
var log = exports.log = function log() { | ||
for (var _len5 = arguments.length, labels = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { | ||
labels[_key5] = arguments[_key5]; | ||
} | ||
return lens(show.apply(undefined, labels.concat(["get"])), show.apply(undefined, labels.concat(["set"]))); | ||
}; | ||
exports.default = compose; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wYXJ0aWFsLmxlbnNlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQTs7S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pXG4gICAgICBlbHNlXG4gICAgICAgIGlmIChrIGluIGMpXG4gICAgICAgICAgc2V0KGssIGNba10pXG4gICAgfVxuICAgIHJldHVybiB6XG4gIH0pKVxuXG5leHBvcnQgY29uc3QgcGljayA9IHRlbXBsYXRlID0+IGxlbnMoXG4gIGMgPT4ge1xuICAgIGxldCByXG4gICAgZm9yIChjb25zdCBrIGluIHRlbXBsYXRlKSB7XG4gICAgICBjb25zdCB2ID0gZ2V0KHRlbXBsYXRlW2tdLCBjKVxuICAgICAgaWYgKHYgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAociA9PT0gdW5kZWZpbmVkKVxuICAgICAgICAgIHIgPSB7fVxuICAgICAgICByW2tdID0gdlxuICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gclxuICB9LFxuICAobyA9IGVtcHR5LCBjSW4pID0+IHtcbiAgICBsZXQgYyA9IGNJblxuICAgIGZvciAoY29uc3QgayBpbiB0ZW1wbGF0ZSlcbiAgICAgIGMgPSBzZXQodGVtcGxhdGVba10sIG9ba10sIGMpXG4gICAgcmV0dXJuIGNcbiAgfSlcblxuZXhwb3J0IGNvbnN0IGlkZW50aXR5ID0gbGVucyhpZCwgY29uc2VydmUpXG5cbmV4cG9ydCBjb25zdCBwcm9wcyA9ICguLi5rcykgPT4gcGljayhSLnppcE9iaihrcywga3MpKVxuXG5leHBvcnQgZGVmYXVsdCBjb21wb3NlXG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wYXJ0aWFsLmxlbnNlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQTs7SUFBWTs7Ozs7Ozs7OztBQUlaLElBQU0sS0FBSyxTQUFMLEVBQUs7U0FBSztDQUFMO0FBQ1gsSUFBTSxNQUFNLFNBQU4sR0FBTSxDQUFDLENBQUQsRUFBSSxDQUFKO1NBQVU7Q0FBVjs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XRcIiksIHNob3coLi4ubGFiZWxzLCBcInNldFwiKSlcblxuZXhwb3J0IGRlZmF1bHQgY29tcG9zZVxuIl19 |
{ | ||
"name": "partial.lenses", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "Partial lenses", | ||
@@ -5,0 +5,0 @@ "main": "lib/partial.lenses.js", |
@@ -838,2 +838,26 @@ [ [Tutorial](#tutorial) | [Reference](#reference) | [Background](#background) ] | ||
### Debugging | ||
#### [`L.log(...labels)`](#lloglabels "L.log :: (...Any) -> Lens s s") | ||
`L.log(...labels)` is an identity lens that outputs `console.log` messages with | ||
the given labels (or format in Node.js) when data flows in either direction, | ||
`get` or `set`, through the lens. | ||
For example: | ||
```js | ||
L.get(P("x", L.log()), {x: 10}) | ||
// get 10 | ||
// 10 | ||
L.set(P("x", L.log("x")), "11", {x: 10}) | ||
// x get 10 | ||
// x set 11 | ||
// { x: '11' } | ||
L.set(P("x", L.log("%s x: %j")), "11", {x: 10}) | ||
// get x: 10 | ||
// set x: "11" | ||
// { x: '11' } | ||
``` | ||
## Background | ||
@@ -840,0 +864,0 @@ |
@@ -222,2 +222,6 @@ import * as R from "ramda" | ||
const show = (...labels) => x => console.log(...labels, x) || x | ||
export const log = (...labels) => lens(show(...labels, "get"), show(...labels, "set")) | ||
export default compose |
@@ -44,2 +44,8 @@ import * as R from "ramda" | ||
describe("L.identity", () => { | ||
testEq('L.get(L.identity, "any")', "any") | ||
testEq('L.modify(L.identity, R.add(1), 2)', 3) | ||
testEq('L.remove(P("x", L.identity), {x: 1, y: 2})', {y: 2}) | ||
}) | ||
describe("arities", () => { | ||
@@ -46,0 +52,0 @@ testEq('L.augment.length', 1) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134642
715
916