import { JsonpConfig , JsonpPromise } from './types' ; import { buildURL } from './helpers/url' ; import jsonp from './core/jsonp' ; function jsonpG ( config ) { processConfig ( config ) ; return jsonp ( config ) ; } function processConfig ( config ) { config . url = transformURL ( config ) ; } function transformURL ( config ) { const { url , funcName , params } = config ; return buildURL ( url , funcName ! , params ) ; } export default jsonpG ;