open-index/open-npm huggingface dataset:
npm package: @mahnerak/mongodb-autoincrement
Description: Auto increment support for mongodb and mongoose
Author: Alexey Chistyakov
Latest version: 1.0.0

# mongodb-autoincrement
=====================

Module to auto increment mongodb _id index. There is also mongoose plugin here.

## Installing

> npm install mongodb-autoincrement

## Using

### ...with mongodb-native driver

Gets next auto increment integer index from database for the given collection. 
The successive calls to this function return different values so you can safely use it in multi client applications.

> getNextSequence(db, collectionName, fieldName, callback)

* db - mongodb-native driver connection object
* collectionName - name of the collection to get auto increment index for, string
* fieldName - name of the auto increment field [optional]
* callback - function (err, nextFreeIndex)

````js
var MongoClient = require("mongodb").MongoClient;
var autoIncrement = require("mongodb-autoincrement");

MongoClient.connect(url, function (err, db) {
    autoIncrement.getNextSequence(db, collectionName, function (err, autoIndex) {
        var collection = db.collection(collectionName);
        collection.insert({
            _id: autoIndex,
            ...
        });
    });
});
````

### ...with mongoose

The plugin can be applied to particular schema and globally.

> mongoosePlugin(schema, options)

* schema - mongoose.Schema
* options - Object:
    * field - auto increment field name, default _id
    * step - auto increment step, default 1

#### With single schema plugin

````js
var mongoose = require('mongoose');
var autoIncrement = require("mongodb-autoincrement");

var schema = new mongoose.Schema({
    ...
});

schema.plugin(autoIncrement.mongoosePlugin);
````

#### Global plugin usage

While using plugin as global mongoose plugin it will be applied to all schemas with no {_id: false} option set.

````js
var autoIncrement = require("mongodb-autoincrement");
var mongoose = require('mongoose');
mongoose.plugin(autoIncrement.mongoosePlugin, optionalOptions);

var schema1 = new mongoose.Schema({    // _id field will be auto incremented integer
    ...
});

var schema2 = new mongoose.Schema({    // plugin will not be applied
    ...
}, {_id: false});
````

### Setting default options

````js
var autoIncrement = require("mongodb-autoincrement");
autoIncrement.setDefaults({
    collection: collectionName,     // collection name for counters, default: counters
    field: fieldName,               // auto increment field name, default: _id
    step: integerNumber             // auto increment step
});
````

## Notes

You cannot set initial values for auto increment fields by the module. 
If you need it you can always set them directly via mongodb.
Find a record with _id 'collectionName' in the collection 'counters' and set field 'seq' to required value.

Counters collection structure:

````js
{
    _id: collectionName,        // name of the collection for which auto increment id field is set
    field: fieldName,           // name of the field to auto increment in the collection collectionName
    seq: integerValue           // last auto increment value used
}
````
npm package: @mahnunchik/core
Description: A complete tool for building modern Electron applications
Author: Samuel Attard
Latest version: 6.4.2

# Electron Forge Core

Changes from pull request applied https://github.com/electron/forge/pull/3358

This module contains the core logic of Electron Forge and exposes the base
API as a number of simple JS functions.

## Basic Usage

```javascript
import { api } from '@electron-forge/core';

// Package the current directory as an Electron app
api.package(__dirname);
```

The named export `api` has it's methods documented over at [ForgeAPI](https://js.electronforge.io/classes/_electron_forge_core.ForgeAPI.html).
All the methods are async and expose the core forge methods, please note that all
user-side configuration is still done through your forge config file or the "config.forge"
section of your package.json. This API simply let's you call the methods in
node land without using the CLI.

## Error Handling

As all methods return a promise you should handle all rejections, you should note
that rejections will **not** always be errors, in fact we commonly reject our
promises with just strings so do not assume that properties such as `stack` or
`message` will exist on thrown errors.
npm package: @mahnunchik/publisher-github
Description: Github publisher for Electron Forge
Author: Samuel Attard
Latest version: 6.4.2

## publisher-github

Changes from pull request applied https://github.com/electron/forge/pull/1761

`@electron-forge/publisher-github` publishes all your artifacts to GitHub releases, this allows your users to download the files straight from your repository or if your repository is open source you can use [update.electronjs.org](https://github.com/electron/update.electronjs.org) and get a free hosted update service.

Configuration options are documented in [`PublisherGithubConfig`](https://js.electronforge.io/interfaces/_electron_forge_publisher_github.PublisherGitHubConfig.html).

```javascript title=forge.config.js
module.exports = {
  // ...
  publishers: [
    {
      name: '@electron-forge/publisher-github',
      config: {
        repository: {
          owner: 'me',
          name: 'awesome-thing'
        },
        prerelease: true
      }
    }
  ]
};
```
npm package: @mahomuri/yt-playlist-fetcher
Description: Yet another YouTube Playlist fecther.
Author: mahomuri
Latest version: 1.0.2

# YouTube Playlist Fetcher

YouTube Playlist Fetcher is yet again another library that fetched a playlist and returns a big array containing its details

# Usage
```js
const ytfetcher = require('@mahomuri/yt-playlist-fetcher');

ytfetcher('YouTube API Key', 'Playlist ID')
.then(playlistItems => {
    console.log(playlistItems.length);
    console.log(playlistItems);
});
```

# Options

- `maxResults` - The maxmimum amount of results to return from the playlist, starting from 0.

# Installation
```sh
npm install @mahomuri/yt-playlist-fetcher
```

# Testing 

To test it, make sure to change the `process.env.API_KEY` to you own API Key then type:
```sh
npm test
```
npm package: @mahounou/vlogger
Description: VLogger JavaScript adapter / Express middleware
Author: Jules Mahounou
Latest version: 1.5.12

# VLogger JavaScript Adapter

Install:

##npm install vlogger
Usage (Express):
```js
const express = require('express');
const VLogger = require('vlogger');

const app = express();
const logger = new VLogger();
app.use(logger.middleware());
```