Comparing version 2.0.0 to 2.1.0
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.everywhere = exports.transformMove = exports.queryMove = exports.toZipper = exports.right = exports.left = exports.downLast = exports.downHead = exports.downTo = exports.modify = exports.set = exports.keyOf = exports.get = undefined; | ||
exports.everywhere = exports.transformMove = exports.queryMove = exports.toZipper = exports.right = exports.left = exports.downLast = exports.downHead = exports.downPath = exports.downTo = exports.modify = exports.set = exports.keyOf = exports.get = undefined; | ||
exports.up = up; | ||
@@ -12,2 +12,3 @@ exports.head = head; | ||
exports.fromZipper = fromZipper; | ||
exports.pathOf = pathOf; | ||
@@ -104,3 +105,3 @@ var _infestines = require("infestines"); | ||
}; | ||
var set = exports.set = (0, _infestines.curry2)(setU); | ||
var set = exports.set = (0, _infestines.curry)(setU); | ||
@@ -110,3 +111,3 @@ var modifyU = function modifyU(f, z) { | ||
}; | ||
var modify = exports.modify = (0, _infestines.curry2)(modifyU); | ||
var modify = exports.modify = (0, _infestines.curry)(modifyU); | ||
@@ -145,4 +146,10 @@ function up(_ref) { | ||
} | ||
var downTo = exports.downTo = (0, _infestines.curry)(downToU); | ||
var downTo = exports.downTo = (0, _infestines.curry2)(downToU); | ||
function downPathU(path, z) { | ||
for (var i = 0, n = path.length; z && i < n; ++i) { | ||
z = downToU(path[i], z); | ||
}return z; | ||
} | ||
var downPath = exports.downPath = (0, _infestines.curry)(downPathU); | ||
@@ -196,3 +203,3 @@ var downMost = function downMost(head) { | ||
} | ||
var queryMove = exports.queryMove = (0, _infestines.curry4)(queryMoveU); | ||
var queryMove = exports.queryMove = (0, _infestines.curry)(queryMoveU); | ||
@@ -217,3 +224,3 @@ function bwd(move, z) { | ||
}; | ||
var transformMove = exports.transformMove = (0, _infestines.curry3)(transformMoveU); | ||
var transformMove = exports.transformMove = (0, _infestines.curry)(transformMoveU); | ||
@@ -228,3 +235,12 @@ var everywhereG = function everywhereG(f) { | ||
}; | ||
var everywhere = exports.everywhere = (0, _infestines.curry2)(everywh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XG4gICAgY2FzZSB1cDogcmV0dXJuIGRvd25UbyhrZXlPZih6KSlcbiAgICBkZWZhdWx0OiByZXR1cm4gdXBcbiAgfVxufVxuXG5jb25zdCB0cmFuc2Zvcm1Nb3ZlVSA9IChtb3ZlLCBmLCB6KSA9PlxuICBxdWVyeU1vdmVVKG1vdmUsIHosIHggPT4gcXVlcnlNb3ZlVShid2QobW92ZSwgeiksIHosIGlkLCBmKHgpKSwgeilcbmV4cG9ydCBjb25zdCB0cmFuc2Zvcm1Nb3ZlID0gY3VycnkzKHRyYW5zZm9ybU1vdmVVKVxuXG5jb25zdCBldmVyeXdoZXJlRyA9IGYgPT4geiA9PlxuICB0cmFuc2Zvcm1Nb3ZlVShyaWdodCwgZXZlcnl3aGVyZUcoZiksIGV2ZXJ5d2hlcmVVKGYsIHopKVxuY29uc3QgZXZlcnl3aGVyZVUgPSAoZiwgeikgPT5cbiAgbW9kaWZ5VShmLCB0cmFuc2Zvcm1Nb3ZlVShkb3duSGVhZCwgZXZlcnl3aGVyZUcoZiksIHopKVxuZXhwb3J0IGNvbnN0IGV2ZXJ5d2hlcmUgPSBjdXJyeTIoZXZlcnl3aGVyZVUpXG4iXX0= | ||
var everywhere = exports.everywhere = (0, _infestines.curry)(everywhereU); | ||
function pathOf(z) { | ||
var path = []; | ||
while (z && (0, _infestines.isDefined)(z.key)) { | ||
path.unshift(z.key); | ||
z = z.up; | ||
} | ||
return path; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9mYXN0ZW5lci5qcyJdLCJuYW1lcyI6WyJ1cCIsImhlYWQiLCJsYXN0IiwiZnJvbVppcHBlciIsInBhdGhPZiIsImZpcnN0S2V5IiwibyIsImsiLCJsYXN0S2V5Iiwia2V5IiwiaXNTdHJpbmciLCJ4IiwiaXNOdW1iZXIiLCJyZXZlcnNlIiwiZnJvbSIsInRvIiwibGVuZ3RoIiwiemlwcGVyIiwibGVmdC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ikgPT5cbiAgbW9kaWZ5VShmLCB0cmFuc2Zvcm1Nb3ZlVShkb3duSGVhZCwgZXZlcnl3aGVyZUcoZiksIHopKVxuZXhwb3J0IGNvbnN0IGV2ZXJ5d2hlcmUgPSBjdXJyeShldmVyeXdoZXJlVSlcblxuZXhwb3J0IGZ1bmN0aW9uIHBhdGhPZih6KSB7XG4gIGNvbnN0IHBhdGggPSBbXVxuICB3aGlsZSAoeiAmJiBpc0RlZmluZWQoei5rZXkpKSB7XG4gICAgcGF0aC51bnNoaWZ0KHoua2V5KVxuICAgIHogPSB6LnVwXG4gIH1cbiAgcmV0dXJuIHBhdGhcbn1cbiJdfQ== |
{ | ||
"name": "fastener", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Zipper for manipulating JSON", | ||
"main": "lib/fastener.js", | ||
"scripts": { | ||
"bench": "NODE_ENV=production node bench/bench.js", | ||
"dist": "babel src --source-maps inline --out-dir lib", | ||
"bench": "NODE_ENV=production node --expose-gc bench/bench.js", | ||
"dist": "npm run dist:bowerify & npm run dist:bowerify.min & npm run dist:commonjs & wait", | ||
"dist:bowerify": " NODE_ENV=dev browserify src/fastener.js -t babelify --no-bundle-external -d -s F -g envify -o dist/fastener.js", | ||
"dist:bowerify.min": "NODE_ENV=production browserify src/fastener.js -t babelify --no-bundle-external -s F -g envify -g uglifyify -o dist/fastener.min.js", | ||
"dist:commonjs": "babel src --source-maps inline --out-dir lib", | ||
"docs": "./scripts/generate-docs", | ||
@@ -13,2 +16,3 @@ "docs-bundle": "NODE_ENV=dev browserify -r ./lib/fastener:fastener -r ramda -r infestines -r babel-polyfill -g envify -g uglifyify > docs/bundle.js", | ||
"prepublish": "npm run lint && npm run test && npm run dist", | ||
"report-coverage": "nyc report --reporter=lcov > coverage.lcov && codecov", | ||
"test": "nyc mocha" | ||
@@ -35,3 +39,3 @@ }, | ||
"dependencies": { | ||
"infestines": "^0.2.0" | ||
"infestines": "^0.3.2" | ||
}, | ||
@@ -62,12 +66,15 @@ "devDependencies": { | ||
"babel-register": "^6.18.0", | ||
"benchmark": "^2.1.2", | ||
"browserify": "^13.1.1", | ||
"babelify": "^7.3.0", | ||
"benchmark": "^2.1.3", | ||
"browserify": "^13.3.0", | ||
"codecov": "^1.0.1", | ||
"envify": "^4.0.0", | ||
"eslint": "^3.12.2", | ||
"eslint": "^3.13.0", | ||
"marked": "^0.3.6", | ||
"mocha": "^3.2.0", | ||
"nyc": "^10.0.0", | ||
"ramda": "^0.22.1", | ||
"ramda": "^0.23.0", | ||
"sprintf-js": "^1.0.3", | ||
"uglifyify": "^3.0.4" | ||
} | ||
} |
127
README.md
@@ -9,3 +9,3 @@ [ [≡](#contents) | [Tutorial](#tutorial) | [Reference](#reference) | [Related Work](#related-work) | [GitHub](https://github.com/polytypic/fastener) | [Try Fastener!](https://polytypic.github.io/fastener/) ] | ||
[![npm version](https://badge.fury.io/js/fastener.svg)](http://badge.fury.io/js/fastener) [![Build Status](https://travis-ci.org/polytypic/fastener.svg?branch=master)](https://travis-ci.org/polytypic/fastener) [![](https://david-dm.org/polytypic/fastener.svg)](https://david-dm.org/polytypic/fastener) [![](https://david-dm.org/polytypic/fastener/dev-status.svg)](https://david-dm.org/polytypic/fastener?type=dev) | ||
[![npm version](https://badge.fury.io/js/fastener.svg)](http://badge.fury.io/js/fastener) [![Build Status](https://travis-ci.org/polytypic/fastener.svg?branch=master)](https://travis-ci.org/polytypic/fastener) [![Code Coverage](https://img.shields.io/codecov/c/github/polytypic/fastener/master.svg)](https://codecov.io/github/polytypic/fastener?branch=master) [![](https://david-dm.org/polytypic/fastener.svg)](https://david-dm.org/polytypic/fastener) [![](https://david-dm.org/polytypic/fastener/dev-status.svg)](https://david-dm.org/polytypic/fastener?type=dev) | ||
@@ -17,25 +17,28 @@ ## Contents | ||
* [Introduction and Elimination](#introduction-and-elimination) | ||
* [`F.toZipper(json)`](#toZipper "toZipper :: JSON -> Zipper") | ||
* [`F.fromZipper(zipper)`](#fromZipper "fromZipper :: Zipper -> JSON") | ||
* [`F.toZipper(json)`](#F-toZipper "F.toZipper: JSON -> Zipper") | ||
* [`F.fromZipper(zipper)`](#F-fromZipper "F.fromZipper: Zipper -> JSON") | ||
* [Focus](#focus) | ||
* [`F.get(zipper)`](#get "get :: Zipper -> JSON") | ||
* [`F.modify(fn, zipper)`](#modify "modify :: (JSON -> JSON) -> Zipper -> Zipper") | ||
* [`F.set(json, zipper)`](#set "set :: JSON -> Zipper -> Zipper") | ||
* [`F.get(zipper)`](#F-get "F.get: Zipper -> JSON") | ||
* [`F.modify(json => json, zipper)`](#F-modify "F.modify: (JSON -> JSON) -> Zipper -> Zipper") | ||
* [`F.set(json, zipper)`](#F-set "F.set: JSON -> Zipper -> Zipper") | ||
* [Movement](#movement) | ||
* [Parent-Child movement](#parent-child-movement) | ||
* [`F.downHead(zipper)`](#downHead "downHead :: Zipper -> Maybe Zipper") | ||
* [`F.downLast(zipper)`](#downLast "downLast :: Zipper -> Maybe Zipper") | ||
* [`F.downTo(key, zipper)`](#downTo "downTo :: (String|Number) -> Zipper -> Maybe Zipper") | ||
* [`F.keyOf(zipper)`](#keyOf "keyOf :: Zipper -> Maybe (String|Number)") | ||
* [`F.up(zipper)`](#up "up :: Zipper -> Maybe Zipper") | ||
* [`F.downHead(zipper)`](#F-downHead "F.downHead: Zipper -> Maybe Zipper") | ||
* [`F.downLast(zipper)`](#F-downLast "F.downLast: Zipper -> Maybe Zipper") | ||
* [`F.downTo(key, zipper)`](#F-downTo "F.downTo: (String|Number) -> Zipper -> Maybe Zipper") | ||
* [`F.keyOf(zipper)`](#F-keyOf "F.keyOf: Zipper -> Maybe (String|Number)") | ||
* [`F.up(zipper)`](#F-up "F.up: Zipper -> Maybe Zipper") | ||
* [Path movement](#path-movement) | ||
* [`F.downPath([...keys], zipper)`](#F-downPath "F.downPath: [String|Number] -> Zipper -> Maybe Zipper") | ||
* [`F.pathOf(zipper)`](#F-pathOf "F.pathOf: Zipper -> [String|Number]") | ||
* [Sibling movement](#sibling-movement) | ||
* [`F.head(zipper)`](#head "head :: Zipper -> Maybe Zipper") | ||
* [`F.last(zipper)`](#last "last :: Zipper -> Maybe Zipper") | ||
* [`F.left(zipper)`](#left "left :: Zipper -> Maybe Zipper") | ||
* [`F.right(zipper)`](#right "right :: Zipper -> Maybe Zipper") | ||
* [`F.head(zipper)`](#F-head "F.head: Zipper -> Maybe Zipper") | ||
* [`F.last(zipper)`](#F-last "F.last: Zipper -> Maybe Zipper") | ||
* [`F.left(zipper)`](#F-left "F.left: Zipper -> Maybe Zipper") | ||
* [`F.right(zipper)`](#F-right "F.right: Zipper -> Maybe Zipper") | ||
* [Queries](#queries) | ||
* [`F.queryMove(move, default, fn, zipper)`](#queryMove "F.queryMove :: (Zipper -> Maybe Zipper) -> a -> (Zipper -> a) -> Zipper -> a") | ||
* [`F.queryMove(zipper => maybeZipper, value, zipper => value, zipper)`](#F-queryMove "F.queryMove: (Zipper -> Maybe Zipper) -> a -> (Zipper -> a) -> Zipper -> a") | ||
* [Transforms](#transforms) | ||
* [`F.transformMove(move, fn, zipper)`](#transformMove "F.transformMove :: (downHead|downLast|downTo(key)|left|right|up) -> (Zipper -> Zipper) -> Zipper -> Zipper") | ||
* [`F.everywhere(fn, zipper)`](#everywhere "F.everywhere :: (JSON -> JSON) -> Zipper -> Zipper") | ||
* [`F.transformMove(move, zipper => zipper, zipper)`](#F-transformMove "F.transformMove: (F.downHead|F.downLast|F.downTo(key)|F.left|F.right|F.up) -> (Zipper -> Zipper) -> Zipper -> Zipper") | ||
* [`F.everywhere(json => json, zipper)`](#F-everywhere "F.everywhere: (JSON -> JSON) -> Zipper -> Zipper") | ||
* [Related Work](#related-work) | ||
@@ -68,3 +71,3 @@ | ||
First we just create a zipper using [`F.toZipper`](#toZipper): | ||
First we just create a zipper using [`F.toZipper`](#F-toZipper): | ||
@@ -76,9 +79,10 @@ ```js | ||
As can be seen, the zipper is just a simple JSON object and the `focus` is the | ||
`data` object that we gave to [`F.toZipper`](#toZipper). However, you should | ||
use the zipper combinators to operate on zippers rather than rely on their exact | ||
format. | ||
As can be seen, **_the zipper is just a simple JSON object_** and the `focus` is | ||
the `data` object that we gave to [`F.toZipper`](#F-toZipper). As long the data | ||
structure being manipulated is JSON, you can serialize and deserialize zippers | ||
as JSON. However, it is recommended that you use the zipper combinators to | ||
operate on zippers rather than rely on their exact format. | ||
Let's then move into the `contents` property of the object using | ||
[`F.downTo`](#downTo): | ||
[`F.downTo`](#F-downTo): | ||
@@ -97,3 +101,3 @@ ```js | ||
As seen above, the `focus` now has the `contents` array. We can use | ||
[`F.get`](#get) to extract the value under focus: | ||
[`F.get`](#F-get) to extract the value under focus: | ||
@@ -110,3 +114,3 @@ | ||
Then we move into the first element of `contents` using | ||
[`F.downHead`](#downHead): | ||
[`F.downHead`](#F-downHead): | ||
@@ -142,3 +146,3 @@ ```js | ||
And to the next property, `title`, using [`F.right`](#right): | ||
And to the next property, `title`, using [`F.right`](#F-right): | ||
@@ -162,3 +166,3 @@ ```js | ||
Let's then use [`F.modify`](#modify) to modify the `title`: | ||
Let's then use [`F.modify`](#F-modify) to modify the `title`: | ||
@@ -183,3 +187,3 @@ ```js | ||
When we now move outwards using [`F.up`](#up) we can see the changed title | ||
When we now move outwards using [`F.up`](#F-up) we can see the changed title | ||
become part of the data: | ||
@@ -203,3 +207,3 @@ | ||
We can also just move back to the root and get the updated data structure using | ||
[`F.fromZipper`](#fromZipper): | ||
[`F.fromZipper`](#F-fromZipper): | ||
@@ -232,3 +236,3 @@ ```js | ||
Like all the basic zipper movement combinators, [`F.downTo`](#downTo) is a | ||
Like all the basic zipper movement combinators, [`F.downTo`](#F-downTo) is a | ||
*partial function* that returns `undefined` in case the index is out of bounds. | ||
@@ -295,3 +299,3 @@ Let's define a simple function to compose partial functions: | ||
#### <a name="toZipper"></a> [≡](#contents) [`F.toZipper(json)`](#toZipper "toZipper :: JSON -> Zipper") | ||
#### <a name="F-toZipper"></a> [≡](#contents) [`F.toZipper(json)`](#F-toZipper "F.toZipper: JSON -> Zipper") | ||
@@ -311,3 +315,3 @@ `F.toZipper(json)` creates a new zipper that is focused on the root of the given | ||
#### <a name="fromZipper"></a> [≡](#contents) [`F.fromZipper(zipper)`](#fromZipper "fromZipper :: Zipper -> JSON") | ||
#### <a name="F-fromZipper"></a> [≡](#contents) [`F.fromZipper(zipper)`](#F-fromZipper "F.fromZipper: Zipper -> JSON") | ||
@@ -331,3 +335,3 @@ `F.fromZipper(zipper)` extracts the modified JSON object from the given zipper. | ||
#### <a name="get"></a> [≡](#contents) [`F.get(zipper)`](#get "get :: Zipper -> JSON") | ||
#### <a name="F-get"></a> [≡](#contents) [`F.get(zipper)`](#F-get "F.get: Zipper -> JSON") | ||
@@ -349,3 +353,3 @@ `F.get(zipper)` returns the element that the zipper is focused on. | ||
#### <a name="modify"></a> [≡](#contents) [`F.modify(fn, zipper)`](#modify "modify :: (JSON -> JSON) -> Zipper -> Zipper") | ||
#### <a name="F-modify"></a> [≡](#contents) [`F.modify(json => json, zipper)`](#F-modify "F.modify: (JSON -> JSON) -> Zipper -> Zipper") | ||
@@ -366,3 +370,3 @@ `F.modify(fn, zipper)` is equivalent to `F.set(fn(F.get(zipper)), zipper)` and | ||
#### <a name="set"></a> [≡](#contents) [`F.set(json, zipper)`](#set "set :: JSON -> Zipper -> Zipper") | ||
#### <a name="F-set"></a> [≡](#contents) [`F.set(json, zipper)`](#F-set "F.set: JSON -> Zipper -> Zipper") | ||
@@ -392,3 +396,3 @@ `F.set(json, zipper)` replaces the element that the zipper is focused on with | ||
##### <a name="downHead"></a> [≡](#contents) [`F.downHead(zipper)`](#downHead "downHead :: Zipper -> Maybe Zipper") | ||
##### <a name="F-downHead"></a> [≡](#contents) [`F.downHead(zipper)`](#F-downHead "F.downHead: Zipper -> Maybe Zipper") | ||
@@ -398,3 +402,3 @@ `F.downHead(zipper)` moves the focus to the leftmost element of the object or | ||
##### <a name="downLast"></a> [≡](#contents) [`F.downLast(zipper)`](#downLast "downLast :: Zipper -> Maybe Zipper") | ||
##### <a name="F-downLast"></a> [≡](#contents) [`F.downLast(zipper)`](#F-downLast "F.downLast: Zipper -> Maybe Zipper") | ||
@@ -404,3 +408,3 @@ `F.downLast(zipper)` moves the focus to the rightmost element of the object or | ||
##### <a name="downTo"></a> [≡](#contents) [`F.downTo(key, zipper)`](#downTo "downTo :: (String|Number) -> Zipper -> Maybe Zipper") | ||
##### <a name="F-downTo"></a> [≡](#contents) [`F.downTo(key, zipper)`](#F-downTo "F.downTo: (String|Number) -> Zipper -> Maybe Zipper") | ||
@@ -410,3 +414,3 @@ `F.downTo(key, zipper)` moves the focus to the specified object property or | ||
##### <a name="keyOf"></a> [≡](#contents) [`F.keyOf(zipper)`](#keyOf "keyOf :: Zipper -> Maybe (String|Number)") | ||
##### <a name="F-keyOf"></a> [≡](#contents) [`F.keyOf(zipper)`](#F-keyOf "F.keyOf: Zipper -> Maybe (String|Number)") | ||
@@ -416,3 +420,3 @@ `F.keyOf(zipper)` returns the object property name or the array index that the | ||
##### <a name="up"></a> [≡](#contents) [`F.up(zipper)`](#up "up :: Zipper -> Maybe Zipper") | ||
##### <a name="F-up"></a> [≡](#contents) [`F.up(zipper)`](#F-up "F.up: Zipper -> Maybe Zipper") | ||
@@ -422,2 +426,16 @@ `F.up(zipper)` moves the focus from an array element or object property to the | ||
#### Path movement | ||
Path movement is moving the focus along a path from a parent object or array to | ||
a nested child element. | ||
##### <a name="F-downPath"></a> [≡](#contents) [`F.downPath([...keys], zipper)`](#F-downPath "F.downPath: [String|Number] -> Zipper -> Maybe Zipper") | ||
`F.downPath(path, zipper)` moves the focus along the specified path of keys. | ||
##### <a name="F-pathOf"></a> [≡](#contents) [`F.pathOf(zipper)`](#F-pathOf "F.pathOf: Zipper -> [String|Number]") | ||
`F.pathOf(zipper)` returns the path from the root to the current element focused | ||
on by the zipper. | ||
#### Sibling movement | ||
@@ -427,15 +445,15 @@ | ||
##### <a name="head"></a> [≡](#contents) [`F.head(zipper)`](#head "head :: Zipper -> Maybe Zipper") | ||
##### <a name="F-head"></a> [≡](#contents) [`F.head(zipper)`](#F-head "F.head: Zipper -> Maybe Zipper") | ||
`F.head(zipper)` moves the focus to the leftmost sibling of the current focus. | ||
##### <a name="last"></a> [≡](#contents) [`F.last(zipper)`](#last "last :: Zipper -> Maybe Zipper") | ||
##### <a name="F-last"></a> [≡](#contents) [`F.last(zipper)`](#F-last "F.last: Zipper -> Maybe Zipper") | ||
`F.last(zipper)` moves the focus to the rightmost sibling of the current focus. | ||
##### <a name="left"></a> [≡](#contents) [`F.left(zipper)`](#left "left :: Zipper -> Maybe Zipper") | ||
##### <a name="F-left"></a> [≡](#contents) [`F.left(zipper)`](#F-left "F.left: Zipper -> Maybe Zipper") | ||
`F.left(zipper)` moves the focus to the element on the left of the current focus. | ||
##### <a name="right"></a> [≡](#contents) [`F.right(zipper)`](#right "right :: Zipper -> Maybe Zipper") | ||
##### <a name="F-right"></a> [≡](#contents) [`F.right(zipper)`](#F-right "F.right: Zipper -> Maybe Zipper") | ||
@@ -446,3 +464,3 @@ `F.right(zipper)` moves the focus to the element on the right of the current focus. | ||
#### <a name="queryMove"></a> [≡](#contents) [`F.queryMove(move, default, fn, zipper)`](#queryMove "F.queryMove :: (Zipper -> Maybe Zipper) -> a -> (Zipper -> a) -> Zipper -> a") | ||
#### <a name="F-queryMove"></a> [≡](#contents) [`F.queryMove(zipper => maybeZipper, value, zipper => value, zipper)`](#F-queryMove "F.queryMove: (Zipper -> Maybe Zipper) -> a -> (Zipper -> a) -> Zipper -> a") | ||
@@ -468,9 +486,14 @@ `F.queryMove(move, default, fn, zipper)` applies the given function `fn` to the | ||
#### <a name="transformMove"></a> [≡](#contents) [`F.transformMove(move, fn, zipper)`](#transformMove "F.transformMove :: (downHead|downLast|downTo(key)|left|right|up) -> (Zipper -> Zipper) -> Zipper -> Zipper") | ||
#### <a name="F-transformMove"></a> [≡](#contents) [`F.transformMove(move, zipper => zipper, zipper)`](#F-transformMove "F.transformMove: (F.downHead|F.downLast|F.downTo(key)|F.left|F.right|F.up) -> (Zipper -> Zipper) -> Zipper -> Zipper") | ||
`F.transformMove(move, fn, zipper)` applies the given function to the zipper | ||
focused on after the given movement. The function must the return a zipper | ||
focused on the same element that it was given. Then the focus is moved back to | ||
the element that the zipper was originally focused on. Nothing is done in case | ||
of an illegal move. | ||
focused on after the given movement. The movement `move` must be one | ||
of | ||
[`F.downHead`](#F-downHead), | ||
[`F.downLast`](#F-downLast), | ||
[`F.downTo(key)`](#F-downTo), [`F.left`](#F-left), [`F.right`](#F-right), | ||
or [`F.up`](#F-up). The function `fn` must the return a zipper focused on the | ||
same element that it was given. Then the focus is moved back to the element | ||
that the zipper was originally focused on. Nothing is done in case of an | ||
illegal move. | ||
@@ -492,3 +515,3 @@ For example: | ||
#### <a name="everywhere"></a> [≡](#contents) [`F.everywhere(fn, zipper)`](#everywhere "F.everywhere :: (JSON -> JSON) -> Zipper -> Zipper") | ||
#### <a name="F-everywhere"></a> [≡](#contents) [`F.everywhere(json => json, zipper)`](#F-everywhere "F.everywhere: (JSON -> JSON) -> Zipper -> Zipper") | ||
@@ -495,0 +518,0 @@ `F.everywhere(fn, zipper)` performs a transform of the focused element by |
import { | ||
assocPartialU, | ||
curry2, | ||
curry3, | ||
curry4, | ||
curry, | ||
dissocPartialU, | ||
@@ -96,6 +94,6 @@ id, | ||
const setU = (focus, z) => assocPartialU("focus", focus, z) | ||
export const set = curry2(setU) | ||
export const set = curry(setU) | ||
const modifyU = (f, z) => setU(f(get(z)), z) | ||
export const modify = curry2(modifyU) | ||
export const modify = curry(modifyU) | ||
@@ -130,4 +128,10 @@ export function up({left, focus, key, right, up}) { | ||
} | ||
export const downTo = curry(downToU) | ||
export const downTo = curry2(downToU) | ||
function downPathU(path, z) { | ||
for (let i=0, n=path.length; z && i<n; ++i) | ||
z = downToU(path[i], z) | ||
return z | ||
} | ||
export const downPath = curry(downPathU) | ||
@@ -167,3 +171,3 @@ const downMost = head => z => { | ||
function queryMoveU(move, b, f, z) {const m = move(z); return m ? f(m) : b} | ||
export const queryMove = curry4(queryMoveU) | ||
export const queryMove = curry(queryMoveU) | ||
@@ -181,3 +185,3 @@ function bwd(move, z) { | ||
queryMoveU(move, z, x => queryMoveU(bwd(move, z), z, id, f(x)), z) | ||
export const transformMove = curry3(transformMoveU) | ||
export const transformMove = curry(transformMoveU) | ||
@@ -188,2 +192,11 @@ const everywhereG = f => z => | ||
modifyU(f, transformMoveU(downHead, everywhereG(f), z)) | ||
export const everywhere = curry2(everywhereU) | ||
export const everywhere = curry(everywhereU) | ||
export function pathOf(z) { | ||
const path = [] | ||
while (z && isDefined(z.key)) { | ||
path.unshift(z.key) | ||
z = z.up | ||
} | ||
return path | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
116630
656
510
1
35
12
1
4
+ Addedinfestines@0.3.4(transitive)
- Removedinfestines@0.2.0(transitive)
Updatedinfestines@^0.3.2