Essential data structures and behaviors

npm install sntls
64 downloads in the last week
69 downloads in the last month

*Pronounced: "Essentials"*

A collection of general purpose classes and behaviors (class traits) such as collections, dictionaries, trees, ordered lists, profiling, stateful objects, etc. The purpose of **Sntls** is to turn routines performed on multitudes (of data entries or class instances) into a series of linear transformations, akin to the CQS style of jQuery. The goal of Sntls is to make such complex transformations easy to follow and modify.





**Splitting multiple strings at once**

    sntls.Collection.of(String).create(['foo', 'bar'])
        .items // [['f', 'o', 'o'], ['b', 'a', 'r']]


    var whoKnowsWho = {
        "Joe": { knows: ["Al", "David", "Joan"] },
        "Al": { knows: ["Joe"] },
        "Joan": { knows: ["Joe", "Daniel", "Pam"] }

    // first-degree connections of persons with names like "J..."
        // filtering items where keys start with "J"
        // re-interpreting as Tree
        // querying 'knows' nodes
        // and interpreting results as collection of arrays
        .join(' and ') // joining all items
        // forming sentences
        .mapValues(function (item, path) {
            return path.toPath().asArray[0] + " knows " + item;

        // [
        //  "Joe knows Al and David and Joan",
        //  "Joan knows Joe and Daniel and Pam"
        // ]
npm loves you