@@ -492,12 +492,12 @@ Heavily inspired by them as well:
492
492
493
493
```javascript
494
494
//bad
495
- database.get(' pokemons' , function (err, pokemons) {
495
+ database.get(' pokemons' , function(err, pokemons) {
496
496
console.log(pokemons);
497
497
});
498
498
499
499
//good
500
- database.get(' drabonballs' , function (err, drabonballs) {
500
+ database.get(' drabonballs' , function(err, drabonballs) {
501
501
if (err) {
502
502
// handle the error somehow, maybe return with a callback
503
503
return console.log(err);
@@ -510,7 +510,7 @@ Heavily inspired by them as well:
510
510
511
511
```javascript
512
512
//bad
513
- database.get(' drabonballs' , function (err, drabonballs) {
513
+ database.get(' drabonballs' , function(err, drabonballs) {
514
514
if (err) {
515
515
// if not return here
516
516
console.log(err);
@@ -520,7 +520,7 @@ Heavily inspired by them as well:
520
520
});
521
521
522
522
//good
523
- database.get(' drabonballs' , function (err, drabonballs) {
523
+ database.get(' drabonballs' , function(err, drabonballs) {
524
524
if (err) {
525
525
// handle the error somehow, maybe return with a callback
526
526
return console.log(err);
@@ -539,7 +539,7 @@ Heavily inspired by them as well:
539
539
540
540
// good
541
541
function getAnimals(done) {
542
- Animal.get(function (err, animals) {
542
+ Animal.get(function(err, animals) {
543
543
if(err) {
544
544
return done(err);
545
545
}
@@ -565,7 +565,7 @@ Heavily inspired by them as well:
565
565
```javascript
566
566
//bad
567
567
function readPackageJson (callback) {
568
- fs.readFile(' package .json ' , function (err, file) {
568
+ fs.readFile(' package .json ' , function(err, file) {
569
569
if (err) {
570
570
throw err;
571
571
}
@@ -574,7 +574,7 @@ Heavily inspired by them as well:
574
574
}
575
575
//good
576
576
function readPackageJson (callback) {
577
- fs.readFile(' package .json ' , function (err, file) {
577
+ fs.readFile(' package .json ' , function(err, file) {
578
578
if (err) {
579
579
return callback(err);
580
580
}
0 commit comments