Skip to content

Commit 1e59337

Browse files
sdellyssePhillip9587
authored andcommitted
satisfying linter
1 parent b4c3c52 commit 1e59337

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

lib/types/json.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var JSON_SYNTAX_REGEXP = /#+/g
4747
* @public
4848
*/
4949

50-
function json(options) {
50+
function json (options) {
5151
var opts = options || {}
5252

5353
var reviver = opts.reviver
@@ -58,11 +58,11 @@ function json(options) {
5858
return genericParser(assign({}, opts, {
5959
type: type,
6060

61-
charset: function validateCharset(charset) {
61+
charset: function validateCharset (charset) {
6262
return charset.slice(0, 4) === 'utf-'
6363
},
6464

65-
parse: function parse(buf) {
65+
parse: function parse (buf) {
6666
if (buf.length === 0) {
6767
// special-case empty json body, as it's a common client-side mistake
6868
// TODO: maybe make this configurable or part of "strict" option
@@ -100,7 +100,7 @@ function json(options) {
100100
* @private
101101
*/
102102

103-
function createStrictSyntaxError(parser, reviver, str, char) {
103+
function createStrictSyntaxError (parser, reviver, str, char) {
104104
var index = str.indexOf(char)
105105
var partial = ''
106106

@@ -148,7 +148,7 @@ function firstchar (str) {
148148
* @return {SyntaxError}
149149
*/
150150

151-
function normalizeJsonSyntaxError(error, obj) {
151+
function normalizeJsonSyntaxError (error, obj) {
152152
var keys = Object.getOwnPropertyNames(error)
153153

154154
for (var i = 0; i < keys.length; i++) {

lib/types/urlencoded.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function urlencoded (options) {
4343

4444
var queryparse = opts.parser || (
4545
extended
46-
? extendedparser(opts)
47-
: simpleparser(opts)
46+
? extendedparser(opts)
47+
: simpleparser(opts)
4848
)
4949

5050
return genericParser(assign({}, opts, {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@
4848
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
4949
"test-cov": "nyc --reporter=html --reporter=text npm test"
5050
}
51-
}
51+
}

test/json.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ describe('bodyParser.json()', function () {
100100
return { foo: 'bar' }
101101
}
102102
}))
103-
.post('/')
104-
.set('Content-Type', 'application/json')
105-
.send('{"str":')
106-
.expect(200, '{"foo":"bar"}', done)
103+
.post('/')
104+
.set('Content-Type', 'application/json')
105+
.send('{"str":')
106+
.expect(200, '{"foo":"bar"}', done)
107107
})
108108

109109
describe('when JSON is invalid', function () {

test/urlencoded.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ describe('bodyParser.urlencoded()', function () {
2424
request(createServer({
2525
parser: function (input) { return input.toUpperCase() }
2626
}))
27-
.post('/')
28-
.set('Content-Type', 'application/x-www-form-urlencoded')
29-
.send('user=tobi')
30-
.expect(200, '"USER=TOBI"', done)
27+
.post('/')
28+
.set('Content-Type', 'application/x-www-form-urlencoded')
29+
.send('user=tobi')
30+
.expect(200, '"USER=TOBI"', done)
3131
})
3232

3333
it('should 400 when invalid content-length', function (done) {

0 commit comments

Comments
 (0)