SOCKO! is an ETL tool for trees. It walks through an input tree, applies various modifications from a hierarchy tree to it and returns the resulting tree.
This is the core SOCKO api. It's currently the base framework for the SOCKO! command line tool and Grunt helper, that use the API to modify a set of directories in the area of configuration file management. The API is heavily based on js-hierarchy.
The current features include:
For details, see the API documentation
The module includes the complete type definitions for Typescript applications. Simply install the module and you're ready to go:
After installing the module, use it with require():
var sockoApi = ;var rootNode = ;
Install the module and include the browser script:
or use the jsDelivr CDN hosted version:
With this the global namespace will include a "sockoapi" object:
var rootNode = ;
After that, everything's right as working in Node.js.
The SOCKO! api provides a set of custom js-hierarchy nodes. All nodes implement the interface "SockoNodeInterface", that adds a "type" and a "content" property. The type references the specific node, that was used and is mainly used to identify the nodes at runtime. The content holds the original or generated content of the node.
These nodes are provided by the core API:
The different features of the SOCKO! api rely on processors, that process specific node types when walking the input tree. So each processor uses additional node types