0.0.1 • Published 6 years ago

@william-lindner/formify v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

Formify

Formify accepts an object as a parameter and converts into a Form Data object with the same key value pairs.

Installation

To install the package as a dependency use the following.

npm install --save @william-lindner/formify

Examples

import Formify from 'formify';

const data = {
    token: s0M3rAND0mStRinG,
    candy: true
};

Axios.post('/api/endpoint', Formify(data))
    .then(candy => console.log('Obtained the following candy,', candy))
    .catch(err => console.warn('They were out of candy, sad face.'));