mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
Using more strict eslint rules
This commit is contained in:
@@ -14,7 +14,7 @@ function InterceptorManager() {
|
||||
*
|
||||
* @return {Number} An ID used to remove interceptor later
|
||||
*/
|
||||
InterceptorManager.prototype.use = function (fulfilled, rejected) {
|
||||
InterceptorManager.prototype.use = function use(fulfilled, rejected) {
|
||||
this.handlers.push({
|
||||
fulfilled: fulfilled,
|
||||
rejected: rejected
|
||||
@@ -27,7 +27,7 @@ InterceptorManager.prototype.use = function (fulfilled, rejected) {
|
||||
*
|
||||
* @param {Number} id The ID that was returned by `use`
|
||||
*/
|
||||
InterceptorManager.prototype.eject = function (id) {
|
||||
InterceptorManager.prototype.eject = function eject(id) {
|
||||
if (this.handlers[id]) {
|
||||
this.handlers[id] = null;
|
||||
}
|
||||
@@ -37,12 +37,12 @@ InterceptorManager.prototype.eject = function (id) {
|
||||
* Iterate over all the registered interceptors
|
||||
*
|
||||
* This method is particularly useful for skipping over any
|
||||
* interceptors that may have become `null` calling `remove`.
|
||||
* interceptors that may have become `null` calling `eject`.
|
||||
*
|
||||
* @param {Function} fn The function to call for each interceptor
|
||||
*/
|
||||
InterceptorManager.prototype.forEach = function (fn) {
|
||||
utils.forEach(this.handlers, function (h) {
|
||||
InterceptorManager.prototype.forEach = function forEach(fn) {
|
||||
utils.forEach(this.handlers, function forEachHandler(h) {
|
||||
if (h !== null) {
|
||||
fn(h);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user