1. eight-track-normalize-multipart
multipart/form-data normalize function for eight-track
eight-track-normalize-multipart
Package: eight-track-normalize-multipart
Created by: twolfson
Last modified: Thu, 16 Jun 2022 06:34:41 GMT
Version: 0.2.0
Downloads: 27
Repository: https://github.com/twolfson/eight-track-normalize-multipart

Install

npm install eight-track-normalize-multipart
yarn add eight-track-normalize-multipart

eight-track-normalize-multipart Build status

multipart/form-data normalize function for eight-track.

This was built to support easier testing against servers that accept mutlipart/form-data.

Getting Started

Install the module with: npm install eight-track-normalize-multipart

 // Load in dependencies
var normalizeMultipart = require('eight-track-normalize-multipart');
var express = require('express');
var eightTrack = require('eight-track');

// Create eight-track server that is normalizes multipart/form-data boundaries
express().use(eightTrack({
  url: 'http://localhost:1337',
  fixtureDir: 'directory/to/save/responses',
  normalizeFn: normalizeMultipart
})).listen(1338);

Documentation

eight-track-normalize-multipart exports normalizeMultipart as its module.exports.

normalizeMultipart

Function that has the signature as expected by eight-track's normalizeFn parameter. It is designed to mutate info but will not corrupt original request data.

More information can be found in the specification.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint via grunt and test via npm test.

Donating

Support this project and others by twolfson via gittip.

Support via Gittip

Unlicense

As of Jan 27 2014, Todd Wolfson has released this repository and its contents to the public domain.

It has been released under the UNLICENSE.

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code