open-index/open-npm huggingface dataset:
npm package: @ironfly/lru-diskcache
Description: A disk cache object that deletes the least-recently-used items.
Author: Samy Pesse
Latest version: 1.1.2

# lru-diskcache

Modified from GitbookIO lru-diskcache to fix npm audit issues. Test coverage is low on this, recommend using the original lru-diskcache.

[![Build Status](https://travis-ci.org/GitbookIO/lru-diskcache.svg?branch=master)](https://travis-ci.org/GitbookIO/lru-diskcache)

A disk cache object that deletes the least-recently-used items. Based on [lru-cache](https://github.com/isaacs/node-lru-cache).

### Usage

```js
var LRU = require("lru-diskcache")

var cache = LRU('./cache', {
    max: 50
});

cache.init()

cache.set("myfile.md", "A string content")
cache.get("file").then(function() { ... }) // Buffer("A string content")

// with a buffer or stream
cache.set("image.png", new Buffer([ ... ]))
cache.set("index.html", request.get("https://www.google.fr"))

cache.reset()    // empty the cache
```

If you put more stuff in it, then items will fall out.

If you try to put an oversized thing in it, then it'll fall out right away.

### API

```js
// Initialize the cache
cache.init()

// Get content as a buffer (return a promise)
cache.get(key)

// Get content as a string
cache.get(key, { encoding: 'utf8' })

// Get content as a stream (return a promise)
cache.getStream(key)

// Check if a key is in the cache, without updating the recent-ness or deleting it for being stale.
cache.has(key)

// Delete a key from the cache
cache.del(key)

// Return total length of objects in cache taking into account
cache.size()

// Manually iterates over the entire cache proactively pruning old entries
cache.prune()
```
npm package: @ironfly/nuts
Description: Server to make GitHub releases (private) available to download with Squirrel support
Latest version: 3.1.3

# Nuts
Modified to fix audit issues and also with AWS and Filesystem based stores for releases.

Nuts is a simple (and smart) application to serve desktop-application releases.

![Schema](./docs/schema.png)

It uses GitHub as a backend to store assets, and it can easily be deployed to Heroku as a stateless service. It supports GitHub private repositories (useful to store releases of a closed-source application available on GitHub).

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

#### Features

- :sparkles: Store assets on GitHub releases
- :sparkles: Proxy releases from private repositories to your users
- :sparkles: Simple but powerful download urls
    - `/download/latest`
    - `/download/latest/:os`
    - `/download/:version`
    - `/download/:version/:os`
    - `/download/channel/:channel`
    - `/download/channel/:channel/:os`
- :sparkles: Support pre-release channels (`beta`, `alpha`, ...)
- :sparkles: Auto-updates with [Squirrel](https://github.com/Squirrel)
    - For Mac using `/update?version=<x.x.x>&platform=osx`
    - For Windows using Squirrel.Windows and Nugets packages
- :sparkles: Private API
- :sparkles: Use it as a middleware: add custom analytics, authentication
- :sparkles: Serve the perfect type of assets: `.zip` for Squirrel.Mac, `.nupkg` for Squirrel.Windows, `.dmg` for Mac users, ...
- :sparkles: Release notes endpoint
    - `/notes/:version`
- :sparkles: Up-to-date releases (GitHub webhooks)
- :sparkles: Atom/RSS feeds for versions/channels

#### Deploy it / Start it

[Follow our guide to deploy Nuts](https://nuts.gitbook.com/deploy.html).


#### Auto-updater / Squirrel

This server provides an endpoint for [Squirrel auto-updater](https://github.com/atom/electron/blob/master/docs/api/auto-updater.md), it supports both [OS X](https://nuts.gitbook.com/update-osx.html) and [Windows](https://nuts.gitbook.com/update-windows.html).

#### Documentation

[Check out the documentation](https://nuts.gitbook.com) for more details.