From dfcdf37b7937dc38192d1d0cd0f12db360ea26b8 Mon Sep 17 00:00:00 2001 From: Jonathan Cardoso Machado Date: Mon, 20 May 2019 19:31:36 -0300 Subject: [PATCH] chore: rename internal fn on curly wrapper from curl to curly --- lib/curly.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/curly.ts b/lib/curly.ts index 703b5aba6..c5512ee64 100644 --- a/lib/curly.ts +++ b/lib/curly.ts @@ -86,7 +86,7 @@ export interface CurlyFunction extends HttpMethodCalls { } const create = (): CurlyFunction => { - function curl( + function curly( url: string, options: CurlOptionValueType = {}, ): Promise { @@ -134,22 +134,22 @@ const create = (): CurlyFunction => { }) } - curl.create = create + curly.create = create for (const httpMethod of methods) { // @ts-ignore - curl[httpMethod] = + curly[httpMethod] = httpMethod === 'get' - ? curl + ? curly : (url: string, options: CurlOptionValueType = {}) => - curl(url, { + curly(url, { customRequest: httpMethod, ...options, }) } // @ts-ignore - return curl + return curly } export const curly = create()