Completed
Push — master ( e79fde...1195ed )
by greg
01:44
created

src/server/helpers/abe-locale.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 20
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A abe-locale.js ➔ ??? 0 4 1
1
import fse from 'fs-extra'
2
import extend from 'extend'
3
import clc from 'cli-color'
4
import path from 'path'
5
6
import {
7
  config
8
} from '../../cli'
9
10
var result = {}
11
12
var pathToLocale = path.join(__dirname, '../' + config.localeFolder, config.intlData.locales)
13
var files = fse.readdirSync(pathToLocale)
14
15
Array.prototype.forEach.call(files, (file) => {
16
  var json = fse.readJsonSync(pathToLocale + '/' + file)
17
  result = extend(true, result, json)
18
})
19
20
export default result