Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

element-data-store

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

element-data-store

Simple library that provides an api to stores data for an element (similar to $.data in jQuery)

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

element-data-store

element-data-store is a simple library that provides an api to stores data for an element (similar to $.data in jQuery)

Add element-data-store to your project

There are multiple ways to add element-data-store to your project.

  • Download from GitHub
  • Install using npm npm install element-data-store

Usage

Add data to an element

To add data to an element use the set method, passing the element, a key and the value you want to store.

elementDataStore.set(element, key, value);

Fetch data for an element

To get data to an element use the get method, passing the element. The key is an optional parameter, passing it will get the value for the key, not passing the parameter will result in being returned all the data stored on the element.

elementDataStore.get(element, [key]);

Remove data from an element

To remove data from an element use the remove method, passing the element. The key is an optional parameter, passing it will remove the value for the key, not passing the parameter will result in the removal of all data stored for the element.

elementDataStore.remove('element', [key])

Licence

License: MIT (http://www.opensource.org/licenses/mit-license.php) Copyright Jonathan Fielding 2015

Keywords

FAQs

Package last updated on 17 Aug 2015

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc