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

cache-key-format

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-key-format

format cache key for redis

latest
Source
npmnpm
Version
1.1.5
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

cache-key-format

  • Support generate cache key with object
    const formated = require('cache-key-format');
    const key = formated('video', {
      country: 'VN',
      age: 7,
      platform: 'ios'
    });

    // video:age_7:country_VN:platform_ios
    const formated = require('cache-key-format');

    const opts = {
      separateKeyValue: '-',
      separateFolder: '::',
      lowerCase: true
    };

    const key = formated('video', {
      country: 'VN',
      age: 7,
      platform: 'ios'
    }, opts);

    // video::age-7::country-vn::platform-ios
  • Default options:
const defaultOpts = {
  separateKeyValue: '_',
  separateFolder: ':',
  lowerCase: false
}

Keywords

redis

FAQs

Package last updated on 29 May 2021

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