How to use the file-system-cache.default function in file-system-cache

To help you get started, we’ve selected a few file-system-cache examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github theenadayalank / lint-prepush / index.js View on Github external
(function() {
  const Listr = require("listr");
  const chalk = require("chalk");
  const debug = require("debug")("lint-prepush:index");
  const os = require('os');
  const Cache = require("file-system-cache").default;

  const cache = Cache({
    basePath: `${os.homedir()}/.lint-prepush`, // Path where cache files are stored.
    ns: process.cwd() // A grouping namespace for items.
  });

  const success = chalk.keyword("green");
  const error = chalk.keyword("red");
  const warning = chalk.keyword("yellow");

  const { log } = console;

  const { userConfig, execSyncProcess } = require("./utils/common");
  const resolveMainTask = require("./utils/resolveMainTask");
  const fetchGitDiff = require("./utils/fetchGitDiff");

  if(!userConfig) {
    process.exitCode = 1;

file-system-cache

A super-fast, promise-based cache that reads and writes to the file-system.

MIT
Latest version published 2 months ago

Package Health Score

76 / 100
Full package analysis

Popular file-system-cache functions