open-index/open-npm huggingface dataset:
npm package: @froice/mongoconnector
Description: A simple mongo db connector. For use in microservices.
Author: SirAglovale
Latest version: 1.6.1

# Froice Mongo Connector

## Install

```bash
  npm install @froice/mongoconnector
```

## Usage

### Create a document

```javascript
const config = {
  mongoURL: ["localhost:27017"],
  mongoUsername: "user",
  mongoPassword: "Password123",
  mongoDatabase: "userAuthenticationDatabase",
  mongoAuth: true,
  mongoAuthSource: "userAuthenticationDatabase"
}
const mc = new MongoConnector(config);

mc.create('user', {
  username: "abc",
  password: "def",
  groups: []
}).then(done => {
  // Do stuff
});
```

### Update a document

```javascript
const config = {
  mongoURL: ["localhost:27017"],
  mongoUsername: "user",
  mongoPassword: "Password123",
  mongoDatabase: "userAuthenticationDatabase",
  mongoAuth: true,
  mongoAuthSource: "userAuthenticationDatabase"
}
const mc = new MongoConnector(config);

mc.update('user', {
  username: "abc"
}, {
  $addToSet: {
    groups: "def"
  }
}).then(done => {
  // Do stuff
});
```

### Find a document

```javascript
const config = {
  mongoURL: ["localhost:27017"],
  mongoUsername: "user",
  mongoPassword: "Password123",
  mongoDatabase: "userAuthenticationDatabase",
  mongoAuth: true,
  mongoAuthSource: "userAuthenticationDatabase"
}
const mc = new MongoConnector(config);

mc.find('user', {
  username: "abc"
}).then(users => {
  // Do stuff
});
```

### Delete a document

```javascript
const config = {
  mongoURL: ["localhost:27017"],
  mongoUsername: "user",
  mongoPassword: "Password123",
  mongoDatabase: "userAuthenticationDatabase",
  mongoAuth: true,
  mongoAuthSource: "userAuthenticationDatabase"
}
const mc = new MongoConnector(config);

mc.delete('user', {
  username: "abc"
}).then(done => {
  // Do stuff
});
```
npm package: @froko/create-vite-ts
Description: A CLI to bootstrap new vite-based TypeScript projects
Author: Patrick Ineichen
Latest version: 8.1.1

# @froko/create-vite-ts

A CLI to bootstrap new vite-based TypeScript projects. Rely on hand-crafted installation and configuration of the following products:

- vite.js
- TypeScript
- EsLint
- Prettier
- Visual Studio Code Extension recommendations
- Visual Studio Code settings (format & lint your code on save)
- TailwindCSS (optional)
- Lit (optional)
- React (optional)
- Vue.js (optional)
- Svelte (optional)
- Cypress.io (optional)
- Playwright (optional)
- Storybook (optional)
- Ladle (optional)
- Histoire (optional)

## Quick start

`npm init @froko/vite-ts@latest`

It will ask the following questions:

- Project name
- Template type
- Testing framework
- Component explorer

The CLI will create a new directory named by the project name.

## Available template types

- Vanilla Typescript
- Vanilla TypeScript with TailwindCSS
- Lit
- Lit with TailwindCSS
- React
- React with TailwindCSS
- Vue.js
- Vue.js with TailwindCSS
- Svelte
- Svelte with TailwindCSS

## Available testing frameworks

- Cypress.io
- Playwright
- None (if you don't want to benefit from e2e and component testing)

## Available component explorers

- Storybook
- Ladle (only React)
- Histoire (only Vue.js and Svelte)
- None (if you don't want to benefit from isolated component visualization)

## npm scripts

### Available in all templates:

- `npm run dev`: Starts the application at http://localhost:3000
- `npm run build`: Builds the application into the `dist` folder
- `npm run preview`: Serves the built application at http://localhost:3000

### Only available with Cypress.io option:

- `npm run cypress`: Starts the application & runs Cypress.io in visual mode
- `npm run cypress:ci`: Serves the builtapplication & runs Cypress.io in headless mode

### Only available with Playwright option:

- `npm run playwright`: Runs your playwright e2e tests in different headless browsers
- `npm run playwright:ct`: Runs your playwright component tests in different headless browsers
- `npm run playwright:report`: Shows the Playwright HTML report of the last test run

### Only available with Storybook option:

- `npm run storybook`: Starts Storybook at http://localhost:6006

### Only available with Ladle option:

- `npm run ladle`: Starts Ladle at http://localhost:61000

### Only available with Histoire option:

- `npm run histoire`: Starts Histoire at http://localhost:6006

## Sample application

All templates provide a simple rating app. While building this product, I wanted to have something more than just a Click-Counter-Button to showcase the capabilities of web components together with sophisticated testing (Cypress.io, Playwright) and visualization (Storybook, Ladle, Histoire).

The rating app looks like this:
![Rating App](assets/rating-app.png)

Feel free to delete all the sample application related code in the `src` folder and start over with your own project!

## What's next?

- Include solidjs templates
- Include Angular templates
- ...
npm package: @froko/eslint-config
Description: Shareable ESLint configuration
Author: Patrick Ineichen
Latest version: 2.1.0

# 📦 [`@froko/eslint-config`](https://www.npmjs.com/package/@froko/eslint-config)

![](https://img.shields.io/npm/v/%40froko%2Feslint-config/latest.svg)
[![](https://img.shields.io/npm/dw/@froko/eslint-config)](https://npmjs.com/package/@froko/eslint-config)

## 📥 Installation

```bash
npm install --save-dev @froko/eslint-config eslint
yarn add --dev @froko/eslint-config eslint
pnpm install --save-dev @froko/eslint-config eslint
```

## 🔩 Usage

### Basic configuration

The default configuration includes recommended rules for JavaScript, strict and
stylistic rules for TypeScript and the SimpleImportSort plugin. Files and
directories defined in `.gitignore` are ignored automatically.

```js
// eslint.config.js
import { defaultConfigWithPrettier } from '@froko/eslint-config'
import { defineConfig } from 'eslint/config'

export default defineConfig(defaultConfigWithPrettier)
```

### Configuration with additional plugins

As right now, the shared eslint config does not provide any other plugins. But
you can add the required plugins after the default configuration. Be aware that
the prettier plugin has to be included as last element.

```js
// eslint.config.js
import { defaultConfig, withPrettier } from '@froko/eslint-config'
import { defineConfig } from 'eslint/config'

export default defineConfig(
  defaultConfig,
  // your plugins,
  withPrettier,
)
```

### 📝 Content

```js
import path from 'node:path'

import { includeIgnoreFile } from '@eslint/compat'
import js from '@eslint/js'
import eslintConfigPrettier from 'eslint-config-prettier'
import simpleImportSort from 'eslint-plugin-simple-import-sort'
import globals from 'globals'
import tseslint from 'typescript-eslint'

const gitingore = path.resolve(process.cwd(), '.gitignore')

export const defaultConfig = [
  includeIgnoreFile(gitingore),
  {
    files: ['**/*.{js,mjs,cjs,ts,mts,cts}'],
    plugins: { js },
    extends: ['js/recommended'],
    languageOptions: {
      globals: {
        ...globals.browser,
        ...globals.node,
      },
    },
  },
  tseslint.configs.strict,
  tseslint.configs.stylistic,
  {
    plugins: { 'simple-import-sort': simpleImportSort },
    rules: {
      'simple-import-sort/imports': 'warn',
      'simple-import-sort/exports': 'warn',
    },
  },
]

export const withPrettier = eslintConfigPrettier

export const defaultConfigWithPrettier = [...defaultConfig, withPrettier]
```