1.3.0 • Published 5 years ago

libj-formdata-extension v1.3.0

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

libj-formdata-extension

Part of libj tools

Adds a put function to browser's FormData which supports a function with 'one-level' nesting of properties: String, Number, Array of Primitive values

Also adds a print function to browser's FormData which prints its keys and values in just "modern browsers"

Usage (npm)

npm install libj-formdata-extension

Example

import { formDataExtensions } from 'libj-formdata-extension'

var formData = new FormData();
formDataExtensions.put(formData, {
    api_param_1: 'example value',
    api_param_2: ['value1', 'value2', ...]
})
formDataExtensions.print(formData)      //This is not supported in some browsers, anyway you won't need it much

Test

  • Run this in a separate command line to start node server
node server.js
  • Run one of the following to re-create bundles
npm run dev
npm run dev:watch

Build

npm run build
npm run build:watch

Make sure to test everything in all browsers (specially IE 10/11)

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago