Constructor
new DeviceInfo()
Members
breakpoints
Set breakpoints (pixel values will be converted to integers).
Methods
isEqual(breakpoint) → {Boolean}
Check if current device width is equal to the given breakpoint.
Parameters:
Name | Type | Description |
---|---|---|
breakpoint |
String | Breakpoint to check. |
`true` if device width is equal to the given breakpoint, otherwise `false`.
Boolean
isLargerThan(breakpoint) → {Boolean}
Check if current device width is larger than given breakpoint.
Parameters:
Name | Type | Description |
---|---|---|
breakpoint |
String | Breakpoint to check. |
`true` if device width is larger than given breakpoint, otherwise `false`.
Boolean
isLargerThanOrEqual(breakpoint) → {Boolean}
Check if device width is equal or larger than given breakpoint.
Parameters:
Name | Type | Description |
---|---|---|
breakpoint |
String | Breakpoint to check. |
`true` if device width is equal or larger than given breakpoint, otherwise `false`.
Boolean
isSmallerThan(breakpoint) → {Boolean}
Check if current device width is smaller than given breakpoint.
Parameters:
Name | Type | Description |
---|---|---|
breakpoint |
String | Breakpoint to check. |
`true` if device width is smaller than given breakpoint, otherwise `false`.
Boolean
isSmallerThanOrEqual(breakpoint) → {Boolean}
Check if device width is equal or smaller than given breakpoint.
Parameters:
Name | Type | Description |
---|---|---|
breakpoint |
String | Breakpoint to check. |
`true` if device width is equal or smaller than given breakpoint, otherwise `false`.
Boolean