2
0
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:
Matt Zabriskie
2015-12-14 20:06:57 -07:00
parent 2b147fb0b7
commit f28a4a8248
16 changed files with 230 additions and 93 deletions
+5 -5
View File
@@ -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);
}