You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

async-storage-tree

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-storage-tree

Use React's async-storage to create a tree of objects.

0.0.3
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

async-storage-tree

Use React's async-storage to create a tree of objects.

WIP - Use at your own peril!

install

npm install async-storage-tree

example

// TODO

api

  • createRoot(obj): Promise

Set obj as the root. Any existing items in asyncStorage will go untouched.

NOTE - If there is an existing root, its children will be orphaned! We recommend to .removeChild() first. (If no arguments are passde to removeChild(), the whole tree will be removed, including children of the root).

  • getRoot(): Promise[Object]

Gets root of tree, returns a Promise.

  • createChild(obj, parentId): Promise

Create obj as a new child of the leaf node with a given id. If no id is specified, will create child of the root node.

  • getChildren(id): Promise[List[Object]]

Get children of node with id. If no id specified, gets the children of the root node.

  • removeChild(id): Promise

Recursively delete nodes (i.e., id and all children).

FAQs

Package last updated on 23 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts