These four lines could be replaced with the following line, I believe:

```javascript
globalIntercept(basePath || createBase(key.split(' ')[1]), interceptor, scope);
```