open-index/open-npm huggingface dataset:
npm package: @maxdome/parse-duration
Description: ## 1 hour 20 minutes in milliseconds
Latest version: 1.4.4

# Usage

## 1 hour 20 minutes in milliseconds

```javascript
const ms = require('@maxdome/parse-duration')('1h 20m');
```

## 1 hour 20 minutes in seconds (with second parameter)

```javascript
const s = require('@maxdome/parse-duration')('1h 20m', 's');
```

## 1 hour 20 minutes in seconds (with "in" keyword)

```javascript
const s = require('@maxdome/parse-duration')('1h 20m in s');
```
npm package: @maxdome/redis
Description: ```javascript const redis = require('@maxdome/redis')(process.env.REDIS_URL);
Latest version: 3.0.2

# Usage

```javascript
const redis = require('@maxdome/redis')(process.env.REDIS_URL);

await redis.setJSON('key', 'value', 1 * 60 * 60);
const value = await redis.getJSON('key');
```

If the expire is an object supporting `asSeconds()` (e.g. [@maxdome/duration](https://www.npmjs.com/package/@maxdome/duration) or [moment.duration](http://momentjs.com/docs/#/durations/)) it will be used.

```javascript
const duration = require('@maxdome/duration');
const redis = require('@maxdome/redis')(process.env.REDIS_URL);

await redis.setJSON('key', 'value', duration('1h'));
const value = await redis.getJSON('key');
```
npm package: @maxdome/redis-flushall
Description: ## The controller
Latest version: 1.0.2
Deprecated: Use

# Usage

## The controller

```javascript
if (process.env.REDIS_FLUSHALL_SECRET) {
  app.post('/debug/redis-flushall', require('@maxdome/redis-flushall').controller({
    redis,
    secret: process.env.REDIS_FLUSHALL_SECRET,
  }));
}
```

## Only the flushall

```javascript
require('@maxdome/redis-flushall')({ redis });
```

# Swagger

```yaml
paths:
  /debug/redis-flushall:
    post:
      summary: "Remove all key/value pairs from the redis"
      parameters:
        - name: secret
          description: "Authorization for the flushall"
          in: query
          type: string
      responses:
        204:
          description: "OK"
        403:
          description: "Missing or incorrect secret"
        500:
          description: "Internal Server Error"
```
npm package: @maxdome/redis-flushdb
Description: ## The controller
Latest version: 1.0.3

# Usage

## The controller

```javascript
if (process.env.REDIS_FLUSHDB_SECRET) {
  app.post('/debug/redis-flushdb', require('@maxdome/redis-flushdb').controller({
    redis,
    secret: process.env.REDIS_FLUSHDB_SECRET,
  }));
}
```

## Only the flushdb

```javascript
require('@maxdome/redis-flushdb')({ redis });
```

# Swagger

```yaml
paths:
  /debug/redis-flushdb:
    post:
      summary: "Remove all key/value pairs from a redis database"
      parameters:
        - name: secret
          description: "Secret for the flushdb"
          in: query
          type: string
          required: true
        - name: db
          description: "Database which gets flushed (optional, default: the default connected one gets flushed)"
          in: query
          type: string
      responses:
        204:
          description: "OK"
        403:
          description: "Missing or incorrect secret"
        500:
          description: "Internal Server Error"
```
npm package: @maxdome/request
Description: ## Simplest usage
Latest version: 1.3.4

# Usage

## Simplest usage

```javascript
const Request = require('@maxdome/request').Request;

const response = await new Request().get('http://google.de');
```

## Set options for a request by a name

```javascript
const RequestBuilder = require('@maxdome/request').RequestBuilder;

const requestBuilder = new RequestBuilder().setOptions('google', {
  url: 'http://google.de',
});

const response = await RequestBuilder.request('google').send();
```

## Set options for all requests

```javascript
const RequestBuilder = require('@maxdome/request').RequestBuilder;

const google = new RequestBuilder({
  url: 'http://google.de',
});

const response = await google.send();
```

## Define and use a class for more complex options

```javascript
const RequestBuilder = require('@maxdome/request').RequestBuilder;

const google = new RequestBuilder({
  url: 'http://google.de',
});

class SearchOptions {
  constructor(q) {
    this.q = q;
  }

  toRequestOptions() {
    return {
      url: {
        path: '/search',
        query: {
          q: this.q,
        },
      },
    };
  }
}

const response = await google
  .send(new SearchOptions('how to use google search'));
```
npm package: @maxdome/request-maxdome
Description: **Attention**: `@dnode/request-maxdome` will use several information from the `package.json` and add them to the headers. This makes it easier to identify the source of the request in the logs of maxdome if there are issues. The information which will be 
Latest version: 6.0.2

# Usage

**Attention**: `@dnode/request-maxdome` will use several information from the `package.json` and add them to the headers. This makes it easier to identify the source of the request in the logs of maxdome if there are issues.
The information which will be used:
* user-agent: `${app.name} v${app.version} via ${lib.name} v${lib.version}`

## Initialize with useful environment variables

`hostname` and `protocol` has the production api (https://heimdall.maxdome.de) as default.

```javascript
const maxdome = require('@dnode/request-maxdome').getRequestBuilder();
```

## Get information for a specific asset by ID

```javascript
const AssetOptions = require('@dnode/request-maxdome').AssetOptions;

const assetId = 'assetId';
const assets = await maxdome.send(new AssetOptions(assetId));
```

## Search assets by title and get the first 3 results

```javascript
const AssetsQueryOptions = require('@dnode/request-maxdome').AssetsQueryOptions;

const title = 'title';
const assetsQueryOptions = new AssetsQueryOptions()
  .addFilter('contentTypeSeriesOrMovies')
  .addFilter('search', title)
  .addQuery('pageSize', 3);

const assets = await maxdome.request('assets').send(assetsQueryOptions);
```

## Get the 50 newest store movies

```javascript
const AssetsQueryOptions = require('@dnode/request-maxdome').AssetsQueryOptions;

const assetsQueryOptions = new AssetsQueryOptions()
  .addFilter('availableWithoutPackage')
  .addFilter('movies')
  .addFilter('new')
  .addFilter('notUnlisted')
  .addQuery('pageSize', 50)
  .addSort('activeLicenseStart', 'desc');

const assets = await maxdome.request('assets').send(assetsQueryOptions);
```