Browse Source

don't erase callback on helpers methods

https://github.com/sindresorhus/npm-name/issues/2
http2
Vsevolod Strukchinsky 10 years ago
parent
commit
472752af14
  1. 5
      index.js

5
index.js

@ -205,6 +205,11 @@ function got(url, opts, cb) {
'delete'
].forEach(function (el) {
got[el] = function (url, opts, cb) {
if (typeof opts === 'function') {
cb = opts;
opts = undefined;
}
return got(url, objectAssign({}, opts, {method: el.toUpperCase()}), cb);
};
});

Loading…
Cancel
Save