# softchef-utility

> ``` const request = new Request(event) ```

Latest version **1.0.13** (published 2021-07-05) · SoftChef license · 0 weekly downloads

## Install

```sh
npm install softchef-utility
pnpm add softchef-utility
yarn add softchef-utility
bun add softchef-utility
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2021-07-05 |
| First published | 2020-02-03 |
| Weekly downloads | 0 |
| License | SoftChef |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 1019.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | SoftChef |
| Maintainers | softchef-iot-lab |

## Links

- npm: https://www.npmjs.com/package/softchef-utility
- Repository: https://github.com/SoftChef/softchef-utility
- Homepage: https://github.com/SoftChef/softchef-utility#readme
- Issues: https://github.com/SoftChef/softchef-utility/issues
- npm.io page: https://npm.io/package/softchef-utility

## Dependencies (4)

- [busboy](https://npm.io/package/busboy.md) ^0.3.1
- [semver](https://npm.io/package/semver.md) ^7.3.2
- [@hapi/joi](https://npm.io/package/@hapi/joi.md) ^17.1.1
- [@hapi/joi-date](https://npm.io/package/@hapi/joi-date.md) ^2.0.1

## Recent versions

- 1.0.13 (latest) — 2021-07-05
- 1.0.12 — 2021-07-05
- 1.0.11 — 2021-02-03
- 1.0.10 — 2020-09-23
- 1.0.9 — 2020-09-17
- 1.0.8 — 2020-07-31
- 1.0.7 — 2020-07-30
- 1.0.6 — 2020-07-30
- 1.0.5 — 2020-07-30
- 1.0.4 — 2020-07-20
- 1.0.3 — 2020-07-16
- 1.0.2 — 2020-02-14
- 1.0.1 — 2020-02-03
- 1.0.0 — 2020-02-03

## README

## Request

```
const request = new Request(event)
```

Methods:

```
request.parameter(key)
// Get URL path paramter, ex: /Users/{username}, request.parameter('username')

request.get(key, defaultValue)
// Get query string, ex: ?filter=hello, request.get('filter', null)

request.input(key, defaultValue)
// Get post field data, ex: name=Josh, request.input('name', 'Who')

request.inputs(keys)
// Get post mulitple fields data, ex: name=Josh&enabled=true, request.inputs(['name', 'enabled'])

request.validate(keysProvider)
// Validate input data, keysProvider is an callback, keysProvider(joi) please return a Joi rules
```

---
_Source: https://npm.io/package/softchef-utility · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
