open-index/open-npm huggingface dataset:
npm package: @fleon/parcel-transformer-svelte
Description: Parcel 2 transformer for Svelte 3
Author: Vladislav Orlov
Latest version: 1.1.2

# parcel-transformer-svelte

A Parcel 2 transformer for Svelte 3.

## Installation

```bash
npm install parcel-transformer-svelte -D
```

After this you should configure in `.parcelrc` the transformation for Svelte files:

```json
{
  "extends": ["@parcel/config-default"],
  "transformers": {
    "*.svelte": ["parcel-transformer-svelte"]
  }
}
```

## Configuration

You can change Svelte options though a `.svelterc`, `svelte.config.js` file or `svelte` field
in `package.json`.

For documentation on which options you can use look at the official
[svelte docs](https://github.com/sveltejs/svelte).

```js
// Options used by svelte.compile
compilerOptions: {
  ...
},
// Preprocessors for svelte.preprocess
preprocessors: {
  ...
}
```

## License

MIT License
npm package: @flerokoo/graceful-shutdown-handler
Description: Helper utility for shutting down anything gracefully
Author: Emile Shodiev
Latest version: 1.0.0-development

# Graceful Shutdown Handler
This is an utility package for shutting down gracefully virtually anything: servers, database connections, workers, etc.

`GracefulShutdownHandler` waits for certain signal from user, uncaught error or unhandler rejection and, instead of exiting right away, it allows all provided callbacks to complete. 




# Usage example
```sh
npm i @flerokoo/graceful-shutdown-handler
```

```ts
import GracefulShutdownHandler from "graceful-shutdown-handler";

const handler = new GracefulShutdownHandler({
  // events that trigger shutdown (default: ['SIGINT', 'SIGTERM', 'uncaughtException', 'unhandledRejection'])
  events: ['SIGINT', 'SIGTERM'], 
  // maximum amount of time that callbacks are allowed to run (default: 30)
  timeout: 15, 
  // exit code to use when timeout happens (default: 1)
  timeoutExitCode: 0, 
  // extra exit delay, may useful for logging (default: 0.1)
  exitDelay: 1
});

handler.addCallback(() => {
  cleanupOrSomething();
  console.log('cleaned up')
})

// async callbacks are supported too
handler.addCallback(async () => {
  console.log("performing async operation...");
  await someAsyncOperation();
  console.log("async operation performed");
}, {
  // When true: handler will wait for this async operation to complete before starting next one (default: false)
  blocking: true,
  // Order of execution (default: 0)
  order: -1 
});

```

### More examples [here](examples/)
npm package: @flesch/http-logger
Description: Put some morgan in your bunyan.
Author: John Flesch
Latest version: 0.1.0

# @flesch/http-logger

`http-logger` is a marriage between [morgan](https://github.com/expressjs/morgan) and [bunyan](https://github.com/trentm/node-bunyan).

:warning: Use with caution. This is a work in progress, hence why it's namespaced. I'll make it work good and think of a clever name.

## Installation

```bash
$ npm install --save @flesch/http-logger
```

## Basic Usage

```javascript
// server.js

'use strict';

import express from 'express';
import reqid from 'express-request-id';
import httplogger from '@flesch/http-logger';

httplogger.token(':id', (req, res) => {
  return req.id;
});

const app = express();

app.use(reqid());
app.use(httplogger({ meta:{ 'request-id':':id' } }));

app.get('/', (req, res, next) => {
  res.send('Hi, mom!');
});

app.listen(3000);
```

```bash
$ babel-node server.js | bunyan -o short
```

## Options

You can pass `http-logger` an object of optional options:

* **meta**: An object added to bunyan. Each key's value is passed through morgan's token formatter.
* **format**: A morgan log format string.
* **logger**: An existing bunyan instance. The module will create one if null, but that will let you adjust where logs are streamed.

## License

[The MIT License (MIT)](http://flesch.mit-license.org/)

Copyright © 2015 John Flesch, [http://fles.ch](http://fles.ch/)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @flesch/net-promoter-score
Description: Calculate a "Net Promoter Score" from an array of integers
Author: John Flesch
Latest version: 1.0.0

# @flesch/net-promoter-score

📈 Calculate a “Net Promoter Score” from an array of integers.

## Install

```shell
$ npm install --save @flesch/net-promoter-score
```

## Usage

```js
const nps = require('@flesch/net-promoter-score');

const score = nps([10, 9, 10, 8, 7, 5, 6, 9, 10]);

console.log(score); // => 33
```