UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

18 lines (15 loc) 362 B
define(function() { /** * roundedEquals takes two integers and checks if the first is within 1 of the second * * @access private * @function roundedEquals * @param {number} a * @param {number} b * @returns {boolean} */ function roundedEquals(a, b) { return a - 1 === b || a === b || a + 1 === b; } return roundedEquals; });