Socket
Socket
Sign inDemoInstall

async-storage-tree

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
43.8 kB
Created
Weekly downloads
 

Readme

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

Last updated on 23 Jun 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc