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

cache-conf

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cache-conf - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

19

index.js

@@ -20,6 +20,17 @@ 'use strict';

super.set(key, {
timestamp: opts.maxAge && Date.now() + opts.maxAge,
data: val
});
if (typeof key === 'object') {
opts = val || {};
Object.keys(key).forEach(k => {
super.set(k, {
timestamp: opts.maxAge && Date.now() + opts.maxAge,
data: key[k]
});
});
} else {
super.set(key, {
timestamp: opts.maxAge && Date.now() + opts.maxAge,
data: val
});
}
}

@@ -26,0 +37,0 @@

{
"name": "cache-conf",
"version": "0.1.0",
"version": "0.2.0",
"description": "Simple cache config handling for your app or module",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -53,2 +53,6 @@ # cache-conf [![Build Status](https://travis-ci.org/SamVerschueren/cache-conf.svg?branch=master)](https://travis-ci.org/SamVerschueren/cache-conf)

#### set(object, [options])
Set multiple items at once.
##### options

@@ -55,0 +59,0 @@

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