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

@awey/dache

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

@awey/dache

Use memory,session storagy or local storage to cache things

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
decreased by-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

Dache

Use memory,session storagy or local storage to cache things.

Install

# NPM
npm install @awey/dache --save

# Yarn
yarn add @awey/dache

Useage

import Dache from '@awey/dache'

const dache = new Dache('local', 'myDache')
dache.set('username', 'Tom')

console.log(dache.get('username'))

API

  • new Dache(type: 'memory' | 'session' | 'local', name: string) => Dache: init a Dache instance
  • dache.get(key: string) => any: retrieve a value by key from cache
  • dache.set(key: string, value: any) => void: store a value by key to cache
  • dache.remove(key: string) => void: delete a value by key from cache
  • dache.clear() => void: clear all values in cache
  • dache.has(key: string): determines whether a key exists(not null)
  • dache.is(key: string, value: any): determines whether a value is equal(===) to the specified value

FAQs

Package last updated on 07 Dec 2022

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