Socket
Socket
Sign inDemoInstall

coreenmo-data-storage

Package Overview
Dependencies
129
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    coreenmo-data-storage

A simple abstraction for storing and retrieving data from local storage or session storage.


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

💾 Requirements

  • Web Browser - Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera].
  • Internet - Because many use CDN and to make it easier to find solutions to all problems.

🎯 How To Use

Example Syntax
const DataStorage = require('./src/dataStorage');

// Create a new instance of DataStorage
const storage = new DataStorage();

// Set data
storage.setItem('key', 'value');

// Get data
const value = storage.getItem('key');
console.log(value); // Output: 'value'

// Remove data
storage.removeItem('key');
Explanation
  • This package provides a simple interface to store and retrieve data using local storage.
Return Value
  • setItem(key, value): Sets the value for the given key.
  • getItem(key): Retrieves the value for the given key.
  • removeItem(key): Removes the value for the given key.

Keywords

FAQs

Last updated on 22 Mar 2024

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