Skip to content

ferdis/nestedjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NestedJS

NestedJS is a lightweight library to implement the nested set model in JavaScript applications.

The Nested Sets Model is a technique used for representing hierarchical data as a tree-like data structure.

Although very convienient and fast when implemented using a relational database system, it's troublesome to implement procedurally.

This library helps bridging the gap between back-end data structures and front-end implementations.

Example

Please refer to example.js for an example on usage.

This library is also available as an npm package:

npm install --save nestedjs

API

The library follows a DSL-like usage structure, whereby method chaining is encouraged. Currently it provides methods to verify relationships, retrieve relationships and to find a particular node in the tree by matching meta data within nodes or co-ordinates.

Please see API.md for more information.

Requests

I highly encourage anybody using this library to suggest features that will find useful, or features that are simply lacking.

Please either create a issue, or feel free to submit a pull request.

License

This project is licensed under the BSD 2-clause license. See LICENSE.md for more information.

About

A lightweight library for working with nested sets in JavaScript.

Resources

License

Stars

Watchers

Forks

Packages

No packages published