Class

DeviceInfo

base/utils/device.DeviceInfo()

DeviceInfo class.

Constructor

new DeviceInfo()

View Source utils/device.js, line 35

Members

breakpoints

Set breakpoints (pixel values will be converted to integers).

View Source utils/device.js, line 50

breakpoints

Return breakpoints.

View Source utils/device.js, line 41

Methods

isEqual(breakpoint) → {Boolean}

Check if current device width is equal to the given breakpoint.
Parameters:
Name Type Description
breakpoint String Breakpoint to check.

View Source utils/device.js, line 75

`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.

View Source utils/device.js, line 88

`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.

View Source utils/device.js, line 114

`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.

View Source utils/device.js, line 101

`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.

View Source utils/device.js, line 125

`true` if device width is equal or smaller than given breakpoint, otherwise `false`.
Boolean