import { Transformable , TransformableObject } from './types' ; export const isURLSearchParams = ( value ) : value is URLSearchParams => { return ( typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams ) ; } ; export const isFormData = ( value ) : value is FormData => { return typeof FormData !== 'undefined' && value instanceof FormData ; } ; export const isPlainObject = ( value ) : value is TransformableObject => { return ( typeof value === 'object' && value !== null && Object . prototype . toString . call ( value ) === '[object Object]' ) ; } ; export const isTransformable = ( value ) : value is Transformable => { return ( Array . isArray ( value ) || isPlainObject ( value ) || isFormData ( value ) || isURLSearchParams ( value ) ) ; } ;