mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-12-08 20:48:46 +00:00
Added code linting & cleaned code acording to JavaScript Standard Style
This commit is contained in:
11
src/util.js
11
src/util.js
@@ -1,3 +1,12 @@
|
||||
/**
|
||||
*
|
||||
* @param {Number} from Lower limit
|
||||
* @param {Number} to Upper limit
|
||||
* @param {Number} value Checked number value
|
||||
*
|
||||
* @return {Number} Either source value itself or limit value if range limits
|
||||
* are exceeded
|
||||
*/
|
||||
export const inRange = (from, to, value) => {
|
||||
if (value < from) {
|
||||
return from
|
||||
@@ -8,6 +17,8 @@ export const inRange = (from, to, value) => {
|
||||
}
|
||||
|
||||
return value
|
||||
// lol
|
||||
// return value < from ? from : (value > to ? to : value)
|
||||
}
|
||||
|
||||
export default { inRange }
|
||||
|
||||
Reference in New Issue
Block a user