open-index/open-npm huggingface dataset:
npm package: @shvmeless/dictionary
Description: This package provides tools that allow you to manipulate dictionaries in a similar way to how you manipulate arrays.
Author: Luciano Aedo Puga
Latest version: 0.3.0

# Dictionary JS

A dictionary is defined as an object containing an indefinite number of properties (entries), all of which share values of the same data type.

This package provides tools that allow you to manipulate dictionaries in a similar way to how you manipulate arrays.

## Installation

To install this package, run the following command in your terminal:

```bash
npm install @shvmeless/dictionary
```

## Dictionary Class

The `Dictionary` class is designed to work mainly with a single dictionary as a reference, where all modifications made are reflected in real time in the dictionary itself.

```typescript
import { Dictionary } from '@shvmeless/dictionary';
```

[Read more about this class here.](docs/dictionary-class.md)

## Dictionary Functions

The `dictionary` module provides a series of functions to manipulate dictionaries more independently and indirectly. Each time `dictionary(object)` is called, a shallow clone is created, leaving the original object unmodified.

```typescript
import { dictionary } from '@shvmeless/dictionary';
```

[Read more about these functions here.](docs/dictionary-module.md)
npm package: @shvmerc/eslint-config
Description: This package provides custom `eslint` configurations for javascript and typescript.
Author: Luciano Aedo Puga
Latest version: 0.2.1-alpha

# ESLint Configurations

This package provides custom `eslint` configurations for your javascript and typescript projects.

## Usage

1. Install this package.

   ```sh
   $ npm install --save-dev @shvmerc/eslint-config
   ```

2. Install the configuration dependencies.

   `@shvmerc/eslint-config/standard`

   ```sh
   $ npm install --save-dev eslint@8.57.0 eslint-plugin-import@2.29.1 eslint-plugin-n@16.6.2 eslint-plugin-promise@6.1.1 @stylistic/eslint-plugin@1.7.0
   ```

   `@shvmerc/eslint-config/standard-ts`

   ```sh
   $ npm install --save-dev eslint@8.57.0 eslint-plugin-import@2.29.1 eslint-plugin-n@16.6.2 eslint-plugin-promise@6.1.1 @stylistic/eslint-plugin@1.7.0 @typescript-eslint/eslint-plugin@7.2.0
   ```

   `@shvmerc/eslint-config/standard-jsx`

   ```sh
   $ npm install --save-dev eslint@8.57.0 eslint-plugin-import@2.29.1 eslint-plugin-n@16.6.2 eslint-plugin-promise@6.1.1 @stylistic/eslint-plugin@1.7.0 eslint-plugin-react@7.34.1
   ```

   `@shvmerc/eslint-config/standard-tsx`

   ```sh
   $ npm install --save-dev eslint@8.57.0 eslint-plugin-import@2.29.1 eslint-plugin-n@16.6.2 eslint-plugin-promise@6.1.1 @stylistic/eslint-plugin@1.7.0 eslint-plugin-react@7.34.1 @typescript-eslint/eslint-plugin@7.2.0
   ```

3. Extend your local configuration.

   **Example:** `.eslintrc.json`

   ```jsonc
   {
     "extends": "@shvmerc/eslint-config/standard-jsx"
   }
   ```

   You can modify the configuration and rules according to your own preferences, for mor information check the official documentation:

   - **Eslint**: https://eslint.org/docs/latest/rules/
   - **Typescript Eslint**: https://typescript-eslint.io/rules/
   - **Stylistic**: https://eslint.style/packages/default
   - **React**: https://github.com/jsx-eslint/eslint-plugin-react
npm package: @shvmerc/filesystem-cli
Description: A set of commands to work more easily with the filesystem in the terminal.
Author: Luciano Aedo Puga
Latest version: 0.1.0-alpha

# FileSystem CLI

A set of commands to work more easily with the filesystem in the terminal.

## Installation

```bash
npm install -g @shvmerc/filesystem-cli
```

## sfsempty

Search for empty directories in a directory and allow to delete them.

### Usage

```bash
sfsempty -d /path/to/directory
```

### Options

| Option                  | Description                                            | Default                   |
| ----------------------- | ------------------------------------------------------ | ------------------------- |
| `-d, --directory <dir>` | Path of the directory from where to start the search.  | Current working directory |
| `--exclude [dirs...]`   | Directories to exclude from the search.                | Empty                     |
npm package: @shvmerc/performance
Description: A JavaScript tool to compare the performance difference between different algorithms, functions or versions of the same code.
Author: Luciano Aedo Puga
Latest version: 0.1.0-alpha

# Performance JS

A JavaScript tool to compare the performance difference between different algorithms, functions or versions of the same code.

**How it works ?**

The `CodeRunner` class is used to group the code blocks, then execute them several times, while calculating the average execution time for each one.

## Usage

Import and initialize an instance of the `CodeRunner` class.

```typescript
const { CodeRunner } = require('@shvmerc/performance');
const runner = new CodeRunner();
```

Add the code blocks using the `add` method, you must enter the following parameters.

- **`id`**: Name or ID for the code block, must be unique.
- **`fn`**: The function that contains the code to be executed.

```typescript
runner.add('Method 1', () => {
  const array: number[] = [];
  for (let i = 0; i <= 100; i++) {
    array.push(i);
  }
  return array;
});

runner.add('Method 2', () => {
  const array = Array(101);
  for (let i = 0; i <= 100; i++) {
    array[i] = i;
  }
  return array as number[];
});

runner.add('Method 3', () => {
  return Array.from({ length: 101 }, (_, index) => index);
});

runner.add('Method 4', () => {
  return Array(101).map((_, index) => index);
});

runner.add('Method 5', () => {
  return [...Array(101).keys()];
});
```

Run the comparison using the `run` method and passing the number of repetitions.

_A larger number of repetitions results in a more accurate comparison, but can significantly increase the total duration._

```typescript
const performances = runner.run(100000);
```

Now you can use the results as you wish, but the package includes a simple way to print the results into the console.

First, create a new instance of the `PerformancePrinter` class, you must enter the results directly as the constructor argument.

```typescript
const { PerformancePrinter } = require('@shvmerc/performance');
const printer = new PerformancePrinter(performances);
```

Execute the `print` method to display a comparative graph of the results.

Multiple options are available to configure the output graph.

- **`options.target`:** Displays the percentage difference between the results and the target. By default, the target will be the lowest average result.
- **`options.sort`:** Sort the results, for `'default'` by index and for `'ascending'` or `'descending'` by average time.
- **`options.highlight`:** Highlights selected code blocks in the results.

```typescript
printer.print({
  target: 'Method 4',
  sort: 'ascending',
  highlight: {
    red: 'Method 2',
    green: 'Method 4',
  },
});
```
npm package: @shwao/express-fingerprint
Description: Client fingerprint server implementation. Fork of https://github.com/yusukeshibata/express-fingerprint. Adds IP and DNT parameter.
Author: Yusuke Shibata
Latest version: 2.0.0

# Fingerprint express middleware

### Information
This is a fork of https://github.com/yusukeshibata/express-fingerprint. I addition to adding a new parameters "IP" and "DNT", this package loads only the parameters you configured. [Yusuke's](https://github.com/yusukeshibata) version loaded all parameters as defaults and therefore loaded the geoip-lite database.

https://w3c.github.io/fingerprinting-guidance/#bib-NDSS-FINGERPRINTING
> Passive fingerprinting is browser fingerprinting based on characteristics observable in the contents of Web requests, without the use of any code executing on the client side.
>
> Passive fingerprinting would trivially include cookies (often unique identifiers sent in HTTP requests) and the set of HTTP request headers and the IP address and other network-level information. The User-Agent string, for example, is an HTTP request header that typically identifies the browser, renderer, version and operating system. For some populations, the user agent string and IP address will commonly uniquely identify a particular user's browser.

Default implementation is `Never trust clients`, So collect only server-side information.
But you can push additional parameter with initialization config.

### Installation

```
npm install @shwao/express-fingerprint
```
### Usage

#### As a Express middleware

```javascript
const Fingerprint = require('express-fingerprint');

app.use(Fingerprint([
		// Defaults
	Fingerprint.useragent(),
	Fingerprint.acceptHeaders(),
	Fingerprint.geoIp(),
	Fingerprint.ip(),
	Fingerprint.dnt(),

	// Additional parameters
	function(next) {
		// ...do something...
		next(null,{
		'param1':'value1'
		})
	},
	function(next) {
		// ...do something...
		next(null,{
		'param2':'value2'
		})
	},
]));

app.get('*',function(req,res,next) {
	// Fingerprint object
	console.log(req.fingerprint)
});
```

req.fingerprint object is like below.
```javascript
{
	"hash": "bd767932c289b92b4de510f4c4d48246",
	"components": {
		"useragent": {
			"browser": {
				"family": "Chrome",
				"version": "50"
			},
			"device": {
				"family": "Other",
				"version": "0"
			},
			"os": {
				"family": "Mac OS",
				"major": "10",
				"minor":"11"
		},
		"acceptHeaders": {
			"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
			"encoding": "gzip, deflate, sdch",
			"language": "en-US,en;q=0.8"
		},
		"geoip": {
			"country": "US",
			"resion": "CA",
			"city": "San Francisco"
		},
		"ip": "140.82.112.4",
		"dnt": true,
		"param1": "value1",
		"param2": "value2"
	}
}
```


### List of fingerprinting sources

* User Agent
* HTTP_ACCEPT Headers
* GEO-IP
* IP
* DNT

#### License

MIT