From f616a0fced199401efc9c2dca806c9842d54ef0a Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 14 Oct 2016 10:07:27 +0700 Subject: [PATCH] make XO happy --- index.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 77b8e27..606f74e 100644 --- a/index.js +++ b/index.js @@ -270,7 +270,7 @@ function normalizeArguments(url, opts) { if (typeof opts.retries !== 'function') { const retries = opts.retries; - opts.retries = function backoff(iter, err) { + opts.retries = (iter, err) => { if (iter > retries || !isRetryAllowed(err)) { return 0; } @@ -309,14 +309,10 @@ helpers.forEach(el => { got[el] = (url, opts) => got(url, Object.assign({}, opts, {method: el})); }); -got.stream = function (url, opts) { - return asStream(normalizeArguments(url, opts)); -}; +got.stream = (url, opts) => asStream(normalizeArguments(url, opts)); helpers.forEach(el => { - got.stream[el] = function (url, opts) { - return got.stream(url, Object.assign({}, opts, {method: el})); - }; + got.stream[el] = (url, opts) => got.stream(url, Object.assign({}, opts, {method: el})); }); function stdError(error, opts) {