(value, min, max)
| 76 | } |
| 77 | |
| 78 | export function clamp(value, min, max) { |
| 79 | if (value < min) { |
| 80 | return min; |
| 81 | } |
| 82 | else if (value > max) { |
| 83 | return max; |
| 84 | } |
| 85 | else { |
| 86 | return value; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | export function objectHasProperty(object, field) { |
| 91 | return Object.prototype.hasOwnProperty.call(object, field); |
no outgoing calls
no test coverage detected