
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Need to handle tree-like objects? We’ve got you covered! Work in progress, try at your own risk.
Features:
Utility functions for:
npm install treecle
or
import * as treecle from "https://treecle.mavo.io/dist/treecle.js";
Or import functions individually from src.
For details on what functions exist and their signatures, see the API docs.
This page exposes a global treecle object for experimentation. Open the console and try things out!
Treecle is designed to work with tree-like objects, where nodes are objects and edges are properties. Arrays are used to represent multiple children of a node. Arrays of arrays have no meaning in such a structure.
However, these constraints are not enforced, and whenever it would not be costly in terms of performance, treecle does try to handle data gracefully.
Certain methods like closest() and children.replace() depend on parent pointers, i.e. being able to get from a node to its parent.
When Treecle traverses an object, it also stores a path from the object to its parent.
To avoid mutating the object, this is stored in a private WeakMap, but you can access it via parents.path(node).
To ensure every node in a (sub)tree has a parent pointer, use parents.update(root).
By default, Treecle assumes that every property that points to an object is a parent-child relationship.
You can customize this by importing the config object and setting config.getChildProperties to a function that returns the child properties of a node as an array of strings.
You can also override config.isNode(node) to be more specific about what should be considered a node.
By default it considers all plain objects (i.e. not instances of a class other than Object) are cobsidered nodes.
FAQs
Utilities for working with JSON data
We found that treecle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.