Passed
Pull Request — master (#81)
by Alejandro
02:37
created

provideServices.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 8
rs 10
1
import axios from 'axios';
2
import Storage from './Storage';
3
import ColorGenerator from './ColorGenerator';
4
import buildShlinkApiClient from './ShlinkApiClientBuilder';
5
6
const provideServices = (bottle) => {
7
  bottle.constant('localStorage', global.localStorage);
8
  bottle.service('Storage', Storage, 'localStorage');
9
  bottle.service('ColorGenerator', ColorGenerator, 'Storage');
10
11
  bottle.constant('axios', axios);
12
  bottle.serviceFactory('buildShlinkApiClient', buildShlinkApiClient, 'axios');
13
};
14
15
export default provideServices;
16