-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(randomvalue): changes to prng to add methods and fix scope usage
feat(randomvalue): changes to prng to add methods and fix scope usage
- Loading branch information
Showing
4 changed files
with
229 additions
and
112 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
module.exports = { | ||
"extends": "airbnb-base" | ||
"extends": "airbnb-base", | ||
"rules": { | ||
"no-underscore-dangle": "off" | ||
} | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* eslint-disable */ | ||
// TODO re-enable eslint when these functions begin to be used | ||
// Currently keeping these around for future use | ||
/** | ||
* The an Error() if the test isn't true | ||
* @param {boolean} test - A boolean value or operation that returns a boolean. | ||
* @param {} iteratee - A message to include in the thrown error | ||
* @return {Error} Throw an Error | ||
*/ | ||
function _test(test, errorMessage) { | ||
if (test) { | ||
throw new Error(errorMessage); | ||
} | ||
} | ||
|
||
/** | ||
* Throw a RangeError if the test isn't true | ||
* @param {boolean} test - A boolean value or operation that returns a boolean. | ||
* @param {string} errorMessage - A message to include in the thrown error | ||
* @return {RangeError} Throw a RangeError | ||
*/ | ||
function _testRange(test, errorMessage) { | ||
if (test) { | ||
throw new RangeError(errorMessage); | ||
} | ||
} | ||
|
||
/** | ||
* Throw a TypeError if the test isn't true | ||
* @param {boolean} test - A boolean value or operation that returns a boolean. | ||
* @param {string} errorMessage - A message to include in the thrown error | ||
* @return {TypeError} Throw a TypeError | ||
*/ | ||
function _testType(test, errorMessage) { | ||
if (test) { | ||
throw new TypeError(errorMessage); | ||
} | ||
} |
Oops, something went wrong.