Passed
Pull Request — master (#2)
by André
03:51 queued 02:09
created

src/input.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 22
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A input.js ➔ ??? 0 20 1
1
'use strict'
2
3
module.exports = (input, callback) => {
4
	const validate = require('./validate')
5
	let error = null
6
	let output
7
8
	validate(input, (validatedInput, thrownError) => {
9
		input = validatedInput
10
		error = thrownError
11
	})
12
13
	output = {
14
		'version': {'ref': 'input'},
15
		'metadata': [
16
			{'name': 'topic', 'value': 'Hulk Hogan'},
17
			{'name': 'timestamp', 'value': Date.now().toString()}
18
		]
19
	}
20
21
	callback(error, output, source)
0 ignored issues
show
Bug introduced by
The variable source seems to be never declared. If this is a global, consider adding a /** global: source */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
22
}
23