open-index/open-npm huggingface dataset:
npm package: @fizker/fix-lockfile
Description: A tool for fixing some of the worst of the npm shrinkwrap noise
Author: Benjamin Horsleben
Latest version: 1.1.2

fix-lockfile
============

A small utility for reverting integrity-only changes in the NPM lockfiles. It does this by analyzing the lockfile and discard changes to any package that is only an integrity change.

Note: This tool requires that your project uses [git](http://git-scm.org), since it uses git to find the unmodified lockfile.


Usage
-----

The expected usage is to execute this after generating a lockfile. The steps are the following:

First, add the NPM hook to `package.json`:

```
...
"scripts": {
	...
	"postshrinkwrap": "fix-lockfile package-lock.json",
},
...
```

Note: If your project uses `npm-shrinkwrap.json` instead of `package-lock.json`,  update the reference in the script.

Then install the package:

```
npm install --save-dev @fizker/fix-lockfile
```

That's all there is to it. Any time NPM rebuilds the lockfile, including installing the `fix-lockfile`   dependency, the script will be executed and the lockfile will be cleaned of integrity-only changes.
npm package: @fizker/serve
Description: A static file HTTP server
Author: Benjamin Horsleben
Latest version: 0.3.1

# @fizker/serve

A static file HTTP server, designed to be running in Docker.

It has no dependencies and does as little work as possible in order to serve files. This is achieved by running a tool like [@fizker/serve-prepare][1] first to prepare the files.

## How to use

See [@fizker/serve-prepare][1] for how to prepare the Docker container. Once the container is built, execute the following command: `docker run -p <desired HTTP port>:8080 -p <desired HTTPS port>:8081 -d <your docker user>/<your project name>`

Internally, the server is configured to run on port 8080 per default, which is why the `-p <desired HTTP port>:8080` ends with `8080`. If desired, the port can be changed by either altering the Dockerfile or by adding `-e PORT=8080` to the run command. Services such as [Heroku](https://www.heroku.com) will also change the port as they require.

The `8081` port is used for HTTPS connections. It can be configured in a manner similar to the HTTP port. If HTTPS support is not wanted, or you have not set up the certificates yet, that portion can be omitted to avoid exposing an unused port to the Docker container.

[1]: https://github.com/fizker/serve-prepare
npm package: @fizker/strip-utf8-bom
Description: A tool for stripping the UTF-8 byte-order-marker from files
Author: Benjamin Horsleben
Latest version: 1.1.0

# strip-utf8-bom

A tool for stripping the UTF-8 byte-order-marker from files.

Since UTF-8 can only have one byte-order by spec, the BOM is unnecessary. [It is even recommended by the spec to avoid!](http://www.unicode.org/versions/Unicode5.0.0/ch02.pdf)


## Using the tool (CLI)

This is meant as a CLI for easily stripping UTF-8. It can be used as such in the following manner:

1. Install the current Node.js LTS (Node.js v. 16+ is supported, earlier versions are untested but may work).
2. `npm i -g strip-utf8-bom`
3. `strip-utf8-bom <file...>`


## Using the tool (node.js)

It also supports being used as in a node.js app:

1. `npm i -D strip-utf8-bom`
2. In the code:
	```js
	import { stripUTF8BOM } from "strip-utf8-bom"

	await stripUTF8BOM(file1, file2, [ file3, file4 ])
	```

The `stripUTF8BOM()` function takes 1 or more files, or an array of files, and starts processing them. It returns a promise that resolves when all files have been processed.

## Testing for BOM

The module also supports testing a single file to see if it starts with the UTF-8 BOM.

To use this from the CLI, pass in either the `--check` or `-c` flag: `strip-utf8-bom --check <file>`. The CLI exists with 0 if the file does not have a BOM, and with 1 if it does start with the BOM.

To use this from node.js, import the `hasBOM` function instead of (or in addition to) the `stripUTF8BOM` function:

```js
import { hasBOM } from "strip-utf8-bom"

if(await hasBOM(file1)) {
	// the file starts with the UTF-8 BOM
}
```

Note that in both cases, if multiple files are passed in, only the first file will be checked.