Skip to main content
Version: 1.0.1

is.blackbarry

is.blackbarry(target: unknown)​

Specification​

  • Target argument: optional.
  • Return: boolean.

Data used for examples

const userAgent = 'Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.342 Mobile Safari/534.11+';

Examples​

is.blackbarry() // true if the command is executed in a browser running on the blackbarry
is.blackbarry(userAgent) // true

// Alternative
IsConfig.state.userAgent = userAgent;
is.blackbarry() // true

is.blackbarry(769) // false
is.blackbarry(false) // false
is.blackbarry(new Boolean(0)) // false
is.blackbarry(new Boolean()) // false
is.blackbarry(0) // false
is.blackbarry('') // false
is.blackbarry({}) // false
is.blackbarry([]) // false
// And all other known types will return false

Reversal boolean result​

is.not.blackbarry() // false if the command is executed in a browser running on the blackbarry
is.not.blackbarry(userAgent) // false

// Alternative
IsConfig.state.userAgent = userAgent;
is.not.blackbarry() // false

is.blackbarry(769) // true
is.blackbarry(false) // true
is.blackbarry(new Boolean(0)) // true
is.blackbarry(new Boolean()) // true
is.blackbarry(0) // true
is.blackbarry('') // true
is.blackbarry({}) // true
is.blackbarry([]) // true
// And all other known types will return true