-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BREAKING CHANGE] Replace constructor function to class declaration (#30
) * Replace constructor function to class declaration * Update README.md - Writing a text page assuming that major version upgrade was done. * Fix Lint: no-unused-vars
- Loading branch information
Showing
24 changed files
with
340 additions
and
407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
'use strict'; | ||
|
||
const util = require('../util'); | ||
const WarehouseError = require('../error'); | ||
|
||
/** | ||
* PopulationError constructor | ||
* | ||
* @class | ||
* @param {String} msg | ||
* @extends WarehouseError | ||
*/ | ||
function PopulationError(msg) { | ||
WarehouseError.call(this); | ||
class PopulationError extends WarehouseError { | ||
|
||
this.name = 'PopulationError'; | ||
this.message = msg; | ||
} | ||
/** | ||
* PopulationError constructor | ||
* | ||
* @param {string} msg | ||
*/ | ||
constructor(msg) { | ||
super(msg); | ||
|
||
util.inherits(PopulationError, WarehouseError); | ||
this.name = 'PopulationError'; | ||
} | ||
} | ||
|
||
module.exports = PopulationError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.