Data Module

Please note that these functions utilize localStorage and do not yet have fallbacks. A lack of localStorage (such as Safari's private browsing) will prevent usage. Earlier versions had various fallbacks and advanced options (such as LevelDB), which is why we introduced callback methods. However, the current version only supports LocalStorage. This will be fixed by version 1.0.

Data Functions & Variables

The Data Module features the following functions:


data.find(collection, key, callback) - back to top

This function uses the collection and key to retreave the corresponding value from localStorage.

It then performs the provided callback function and carries over the results.

- back to top


data.item(collection, key) - back to top

This function is used internally to map the collection and key and returns a new key.

Given user and name it would return nw_user_name.

- back to top


data.option(key) - back to top

This function takes the key and returns the value from within the nw_blockstrap_options entry.

- back to top


data.save(collection, key, value, callback) - back to top

This function uses the collection and key to store the corresponding value into localStorage.

It then performs the provided callback function and carries over the results.

- back to top


  1. Related Articles
  2. Back to Modules
  3. Accounts
  4. API
  5. Buttons
  6. Contacts
  7. Blockchains
  8. Data
  9. Filters
  10. Forms
  11. Security
  12. Styles
  13. Templates
  14. Table of Contents