* Checks if the provided position exceeds the minimum or maximum limit or not. * * @param max - Optional. `true` for testing max, `false` for min, and `undefined` for both. * @param position - Optional. A position to test. If omitted, tests the current position. * * @return `true
( max?: boolean | undefined, position?: number )
| 279 | * @return `true` if the position exceeds the limit, or otherwise `false`. |
| 280 | */ |
| 281 | function exceededLimit( max?: boolean | undefined, position?: number ): boolean { |
| 282 | position = isUndefined( position ) ? getPosition() : position; |
| 283 | const exceededMin = max !== true && orient( position ) < orient( getLimit( false ) ); |
| 284 | const exceededMax = max !== false && orient( position ) > orient( getLimit( true ) ); |
| 285 | return exceededMin || exceededMax; |
| 286 | } |
| 287 | |
| 288 | return { |
| 289 | mount, |
no test coverage detected
searching dependent graphs…