Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    ntreepublic

    Build Status

    ntree

    A file system based "living tree" of functional data.

    npm install ntree --save

    ?

    It assembles a tree of data from fragments recursed out of the config.mount directory.

    Each fragment is a node/javascript file with data per whatever it module.exports.

    TODO: It synchronizes changes: file system ---> tree

    TODO: It synchronizes changes: file system <--- tree

    TODO: It follows symlinks

    TODO: It supports functions.

    TODO: It emits change events.

    eg.

    var ntree = require('ntree');
     
    ntree.create({mount: '/path/to/data/root'})
     
    .then(function(tree) {
      
      // use the tree
     
    })
     
    .catch(function(e) {});
     

    use the tree

     
    // pending
     
    tree.on('modified');
     
    tree.on('unmodified');
     

    important

    This is not a database.

    Reads from updated data fragment (.js) files are synchronous (per require('filename')) and will therefore not scale beyond a moderate concurrency.

    Keywords

    none

    install

    npm i ntree

    Downloadsweekly downloads

    3

    version

    1.0.0

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar