From 28bf7e59bcec4f9b1da2c981d45964ae1cd51482 Mon Sep 17 00:00:00 2001 From: Vinit Shahdeo Date: Fri, 22 Nov 2019 15:54:37 +0530 Subject: [PATCH] fixed typos in comments/console.logs() --- README.md | 2 +- scripts/create-docs.js | 2 +- src/index.js | 2 +- src/modules/car.js | 2 +- src/modules/parkingLot.js | 4 ++-- tests/specs.js | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index eed6dd1c..3e1c4d10 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Slot No. Registration No Color - **slot_numbers_for_cars_with_colour < COLOR >**: `slot_numbers_for_cars_with_colour White` will display slot numbers of the cars of white color e.g. `1, 3` -- **slot_number_for_registration_number < REGISTRATION NUMBER >**: `slot_number_for_registration_number MH-04-AY-1111` will display the slot number for the car with registraion number MH-04-AY-1111. +- **slot_number_for_registration_number < REGISTRATION NUMBER >**: `slot_number_for_registration_number MH-04-AY-1111` will display the slot number for the car with registration number MH-04-AY-1111. - **leave_car_by_registration_number**: `leave_car_by_registration_number JH-01-LT-0008` will free the slot occupied by car with registration number JH-01-LT-0008. diff --git a/scripts/create-docs.js b/scripts/create-docs.js index 8974a21c..4843ccca 100644 --- a/scripts/create-docs.js +++ b/scripts/create-docs.js @@ -16,7 +16,7 @@ console.log(chalk.yellow.bold('Creating documentation using JSDoc...\n')); sh.exec(command, (code, stderr, stdout) => { if (code !== 0 && stderr) { - console.log(chalk.red.bold('Error occured while packaging Parking Lot\n')); + console.log(chalk.red.bold('Error occurred while packaging Parking Lot\n')); return 0; } else { diff --git a/src/index.js b/src/index.js index 978800c2..a7317737 100644 --- a/src/index.js +++ b/src/index.js @@ -12,7 +12,7 @@ var commandLineInputs = process.argv, // processing command line inputs var Parking = require('./modules/parkingLot.js'), parkingLot = new Parking(); -// to avoid memory leaks errors, deafult max listeners = 10 +// to avoid memory leaks errors, default max listeners = 10 require('events').EventEmitter.defaultMaxListeners = 0; if (commandLineInputs[commandLineInputs.length - 1].endsWith('.txt')) { diff --git a/src/modules/car.js b/src/modules/car.js index f3442196..bd5c9f20 100644 --- a/src/modules/car.js +++ b/src/modules/car.js @@ -5,7 +5,7 @@ */ class Car { constructor (NUMBER, COLOR) { - this.NUMBER = NUMBER; // unique propery of an instance of car class + this.NUMBER = NUMBER; // unique property of an instance of car class this.COLOR = COLOR; } diff --git a/src/modules/parkingLot.js b/src/modules/parkingLot.js index 4184813d..bde1c7a5 100644 --- a/src/modules/parkingLot.js +++ b/src/modules/parkingLot.js @@ -112,7 +112,7 @@ class ParkingLot { } /** - * @description Returns an array containg parking details i.e. slot no, registration number and color + * @description Returns an array containing parking details i.e. slot no, registration number and color */ getParkingStatus () { var arr = new Array(); @@ -136,7 +136,7 @@ class ParkingLot { /** * * @param {String} input user's input via terminal - * @description returns a comma separated string of regsitration numbers of car having same color. + * @description returns a comma separated string of registration numbers of car having same color. * It returns null if car is not found */ getCarsWithSameColor (input) { diff --git a/tests/specs.js b/tests/specs.js index 98910163..6ccaeafb 100644 --- a/tests/specs.js +++ b/tests/specs.js @@ -100,7 +100,7 @@ describe('Testing Functions in ParkingLot class', function () { done(); }); - it('Registeration no. for cars with white color', function (done) { + it('Registration no. for cars with white color', function (done) { var ele = parkingLot.getCarsWithSameColor(commands[11]); ele = ele.split(', '); assert.equal(ele[0], 'KA-01-HH-1234');