Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/lodash/_baseRandom.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

18 lines (16 sloc)
541 Bytes
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
/* Built-in method references for those with the same name as other `lodash` methods. */ | |
var nativeFloor = Math.floor, | |
nativeRandom = Math.random; | |
/** | |
* The base implementation of `_.random` without support for returning | |
* floating-point numbers. | |
* | |
* @private | |
* @param {number} lower The lower bound. | |
* @param {number} upper The upper bound. | |
* @returns {number} Returns the random number. | |
*/ | |
function baseRandom(lower, upper) { | |
return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); | |
} | |
module.exports = baseRandom; |