We had only a few function expressions declared with the function keyword; almost everything is using function declarations. This came up after this discussion: https://github.com/badges/shields/pull/2803#discussion_r249011621 though is actually not related ot that example. What’s being removed is a third option, which is assigning to a variable a function expression using the `function` keyword. There’s still room for the programmer to choose between arrow function expressions and function declarations.
10 lines
143 B
JavaScript
10 lines
143 B
JavaScript
'use strict'
|
|
|
|
module.exports = {
|
|
invalidJSON: () => [
|
|
200,
|
|
'{{{{{invalid json}}',
|
|
{ 'Content-Type': 'application/json' },
|
|
],
|
|
}
|