export function isFormData ( formValue ) { return typeof FormData !== 'undefined' && formValue instanceof FormData ; } export function isBlob ( formValue ) { return typeof Blob !== 'undefined' && formValue instanceof Blob ; } export function isArrayBuffer ( formValue ) { return typeof ArrayBuffer !== 'undefined' && formValue instanceof ArrayBuffer ; } export function extractHeaders ( headers ) { var arr = headers . trim ( ) . split ( /[\r\n]+/ ) ; var headerMap = { } ; arr . forEach ( function ( line ) { var parts = line . split ( ': ' ) ; var header = parts . shift ( ) ; var value = parts . join ( ': ' ) ; headerMap [ header ] = value ; } ) ; return headerMap ; }