open-index/open-npm huggingface dataset:
npm package: @hkh12/node-calc
Description: A small, fast, zero-dependency library/CLI to help you parse and calculate basic math expressions.
Author: Hosein Khansari
Latest version: 4.2.1

# node-calc

[![Build Status](https://travis-ci.org/hkh12/node-calc.svg?branch=master)](https://travis-ci.org/hkh12/node-calc)
[![Coverage Status](https://coveralls.io/repos/github/hkh12/node-calc/badge.svg?branch=master)](https://coveralls.io/github/hkh12/node-calc?branch=master)
[![Minzipped size](https://badgen.net/bundlephobia/minzip/@hkh12/node-calc)](https://badgen.net/bundlephobia/minzip/@hkh12/node-calc)

A small, fast, zero-dependency library/CLI to help you parse and calculate basic math expressions. 
It supports +, -, *, / and ^ operators, parenthesis, and functions such as:
- **Trigonometric functions**: sin, cos, tan, cot
- sqrt, cbrt
- **Factorial**: x! (or fact(x))
- abs
- log (base 10), ln

> Functions are written in the form of `f(x)`, `fx` syntax is not supported yet!

## Installation
```sh
npm i @hkh12/node-calc
```

## Examples
```js
const { evalExpression, tokenize, Token, evalTokens } = require('@hkh12/node-calc');
evalExpression('2*2') // 4

const tokens = tokenize('2*2') // -> Token[]
evalTokens(tokens); // 4
```

## CLI
Once installed, you can `node-calc` in your terminal:
```sh
# node-calc [expr...]
node-calc "2*2" "2+2" "1*3" # always wrap your expressions in quotes
node-calc # prompts you
```
npm package: @hkh12/unreadable
Description: Turn your name into an extremely unreadable JS expression.
Author: Hosein Khansari
Latest version: 1.1.1

# unreadable
Turn your name into an extremely unreadable JS expression.

# Usage
```js
import unreadable from '@hkh12/unreadable';

unreadable('hi') // '(((""+Math)[+!!{}+!!{}+!!{}+!!{}+!!{}+!!{}+!!{}+!!{}+!!{}+!!{}+!!{}])+(((typeof ("")[+[]]))[+!!{}+!!{}+!!{}+!!{}+!!{}]))'
eval(unreadable('hi')) // 'hi'
unreadable('Hello') // It only accepts a-z (lowercased), 0-9, and spaces
```
npm package: @hkjeffchan/imagemin
Description: Minify images seamlessly
Latest version: 9.3.3

# imagemin

> Minify images seamlessly
> Fork from https://github.com/imagemin/imagemin
> Repackage with latest dependencies and cjs support

---

## Install

```
$ npm install @hkjeffchan/imagemin
```

## Usage

```js
import imagemin from "imagemin";
import imageminJpegtran from "imagemin-jpegtran";
import imageminPngquant from "imagemin-pngquant";

const files = await imagemin(["images/*.{jpg,png}"], {
	destination: "build/images",
	plugins: [
		imageminJpegtran(),
		imageminPngquant({
			quality: [0.6, 0.8],
		}),
	],
});

console.log(files);
//=> [{data: <Buffer 89 50 4e …>, destinationPath: 'build/images/foo.jpg'}, …]
```

## API

### imagemin(input, options?)

Returns `Promise<object[]>` in the format `{data: Buffer, sourcePath: string, destinationPath: string}`.

#### input

Type: `string[]`

File paths or [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).

#### options

Type: `object`

##### destination

Type: `string`

Set the destination folder to where your files will be written. If no destination is specified, no files will be written.

##### plugins

Type: `Array`

[Plugins](https://www.npmjs.com/browse/keyword/imageminplugin) to use.

##### glob

Type: `boolean`\
Default: `true`

Enable globbing when matching file paths.

### imagemin.buffer(buffer, options?)

Returns `Promise<Buffer>`.

#### buffer

Type: `Buffer`

Buffer to optimize.

#### options

Type: `object`

##### plugins

Type: `Array`

[Plugins](https://www.npmjs.com/browse/keyword/imageminplugin) to use.

## Related

- [imagemin](https://github.com/imagemin/imagemin) - Imagemin orginal
- [imagemin-cli](https://github.com/imagemin/imagemin-cli) - CLI for this module
- [imagemin-app](https://github.com/imagemin/imagemin-app) - GUI app for this module
- [gulp-imagemin](https://github.com/sindresorhus/gulp-imagemin) - Gulp plugin
- [grunt-contrib-imagemin](https://github.com/gruntjs/grunt-contrib-imagemin) - Grunt plugin
npm package: @hkjeffchan/imagemin-pngquant
Description: Imagemin plugin for `pngquant`
Latest version: 11.0.2

# imagemin-pngquant

> [Imagemin](https://github.com/imagemin/imagemin) plugin for [`pngquant`](https://github.com/kornelski/pngquant)
> Forrked from https://github.com/imagemin/imagemin-pngquant
> Repackage for cjs support and updated dependencies
> Remove shipped binary and require manual installation of pngquant now so that you can always get a updated version yourself

## Install

```
Install the [`pngquant`](https://github.com/kornelski/pngquant) binary on the target system. You need to specify the exact path to execute.

$ npm install imagemin-pngquant
```

## Usage

```js
const imagemin = require("imagemin");
const imageminPngquant = require("imagemin-pngquant");

(async () => {
	await imagemin(["images/*.png"], {
		destination: "build/images",
		plugins: [imageminPngquant()],
	});

	console.log("Images optimized");
})();
```

## API

### imageminPngquant(options?)(input)

Returns `Promise<Buffer>`.

#### options

Type: `object`

##### binaryPath

Type: `string`<br />
Default: NO DEFAULT. YOU MUST PASS THIS VALUE!
set the full path to pngquant executable (e.g. /opt/homebrew/bin/pngquant)

##### speed

Type: `number`<br>
Default: `4`<br>
Values: `1` (brute-force) to `11` (fastest)

Speed `10` has 5% lower quality, but is about 8 times faster than the default. Speed `11` disables dithering and lowers compression level.

##### strip

Type: `boolean`<br>
Default: `false`

Remove optional metadata.

##### quality

Type: `Array<min: number, max: number>`<br>
Values: `Array<0...1, 0...1>`<br>
Example: `[0.3, 0.5]`

Instructs pngquant to use the least amount of colors required to meet or exceed
the max quality. If conversion results in quality below the min quality the
image won't be saved.

Min and max are numbers in range 0 (worst) to 1 (perfect), similar to JPEG.

##### dithering

Type: `number | boolean`<br>
Default: `1` (full)<br>
Values: `0...1`

Set the dithering level using a fractional number between 0 (none) and 1 (full).

Pass in `false` to disable dithering.

##### posterize

Type: `number`

Truncate number of least significant bits of color (per channel). Use this when image will be output on low-depth displays (e.g. 16-bit RGB). pngquant will make almost-opaque pixels fully opaque and will reduce amount of semi-transparent colors.

##### verbose

Type: `boolean`<br>
Default: `false`

Print verbose status messages.

#### input

Type: `Buffer | Stream`

Buffer or stream to optimize.