Open LeaVerou opened 8 months ago
Edit: We are now maintaining use cases in this doc
Here we'll collect cases where libraries are writing their own helpers to do the kinds of things Treecle helps them do.
children()
walk()
reduce()
clone()
join()
stringify()
check.deep()
check.equals()
Mavo.Node
walkUp()
propagate()
getClosestItem()
getPath()
pathFrom()
getDescendant()
getCousin()
contains()
getClosest()
equals()
extend()
Object.assign()
each()
Edit: We are now maintaining use cases in this doc
Here we'll collect cases where libraries are writing their own helpers to do the kinds of things Treecle helps them do.
children()
: https://github.com/LeaVerou/htest/blob/main/src/objects.js#L8walk()
: https://github.com/LeaVerou/htest/blob/main/src/objects.js#L54reduce()
: https://github.com/LeaVerou/htest/blob/main/src/objects.js#L93clone()
: https://github.com/LeaVerou/htest/blob/main/src/objects.js#L108join()
: https://github.com/LeaVerou/htest/blob/main/src/objects.js#L163stringify()
: https://github.com/LeaVerou/htest/blob/main/src/objects.js#L209check.deep()
: https://github.com/LeaVerou/htest/blob/main/src/check.js#L43check.equals()
: https://github.com/LeaVerou/htest/blob/main/src/check.js#L91Mavo.Node
traversal methodswalk()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L164walkUp()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L188propagate()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L240getClosestItem()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L387getPath()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L395pathFrom()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L400getDescendant()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L409getCousin()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L413contains()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L462getClosest()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L545getClosestItem()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L555children()
: https://github.com/mavoweb/mavo/blob/main/src/node.js#L568equals()
: https://github.com/cujojs/jiff/blob/master/lib/deepEquals.js#L9clone()
: https://github.com/cujojs/jiff/blob/master/lib/clone.js#L12getPath()
: https://github.com/Starcounter-Jack/JSON-Patch/blob/master/src/helpers.ts#L97extend()
: https://github.com/LeaVerou/bliss/blob/v2/src/extend.js (LikeObject.assign()
but copies accessors instead of executing them)each()
: https://github.com/LeaVerou/bliss/blob/v2/src/each.js (Like ourwalk()
)