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:
import {RootNodeBuilder} from 'socko-api';
let rootNode: RootNodeInterface = new RootNodeBuilder().build();
After installing the module, use it with require():
var sockoApi = require('socko-api');
var rootNode = new sockoApi.RootNodeBuilder().build();
Install the module and include the browser script:
<script type="text/javascript" src="node_modules/socko-api/browser.min.js"></script>
or use the jsDelivr CDN hosted version:
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/socko.api/browser.min.js"></script>
With this the global namespace will include a "sockoapi" object:
var rootNode = new sockoapi.RootNodeBuilder().build();
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
Generated using TypeDoc