Completed
Push — master ( e996a0...a2b082 )
by Alejandro
26s
created

src/utils/services/provideServices.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 15
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
eloc 11
c 1
b 0
f 0
nc 1
dl 0
loc 15
rs 10
wmc 1
mnd 0
bc 1
fnc 1
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A provideServices.js ➔ ??? 0 8 1
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