1.0.6 • Published 5 months ago

nitro-parter v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

NuxtParter

NuxtParter is a utility class for handling HTTP events in a Nuxt.js application. It can parse both multipart form data and regular body data from HTTP requests. It also provides a static method for storing files.

Installation

npm install --save nitro-parter

import { NuxtParter } from 'nitro-parter';

Create a new instance of NuxtParter with the HTTP event you want to handle

let {data, files} = await NuxtParter.readRequestData(event);

Access the parsed data and files from the data and files properties of the NuxtParter instance

event.context.files = files;

event.context.data = data;

Use the static storeFile method to store a file to a specified path

NuxtParter.storeFile(file, path);

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago