New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

kcachable

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kcachable

Easily create cachable values of any type that can be saved/loaded at any times

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

kcachable

Easily create cachable values of any type that can be saved/loaded at any times

Install

npm i kcachable

Usage

import { Cachable } from 'kcachable'

const value: string = null    // Value to init with (optional)
const defaultValue = 'string' // Value to use if init-value is null and there is no value saved yet
const saveIfNotExists = false  // save enw value (init-value or defaultValue) there is no value saved yet
const cVal = new Cachable('myVal.json', value, defaultValue, saveIfNotExists)

console.log(cVal.value)
cVal.value = 'newString'
cVal.save()

FAQs

Package last updated on 27 Sep 2020

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