# util.types

> `util.types` provides type checks for different kinds of built-in objects. Unlike `instanceof` or `Object.prototype.toString.call(value)`, these checks do not inspect properties of the object that are accessible from JavaScript (like their prototype), and usually have the overhead of calling into C++. The result generally does not make any guarantees about what kinds of properties or behavior a value exposes in JavaScript. They are primarily useful for addon developers who prefer to do type checking in JavaScript.

- Source: https://titaniumsdk.com/docs/sdk/12.8.0/util.types
- Titanium SDK version: 12.8.0
- Kind: pseudo
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 8.1.0

## Methods

### isAnyArrayBuffer

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `ArrayBuffer` or `SharedArrayBuffer` instance.

See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isArgumentsObject

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is an `arguments` object.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isArrayBuffer

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `ArrayBuffer` instance. This does not include `SharedArrayBuffer` instances. Usually, it is desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isArrayBufferView

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is an instance of one of the `ArrayBuffer` views, such as typed array objects or `DataView`. Equivalent to `ArrayBuffer.isView()`.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isAsyncFunction

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is an `async` function. This only reports back what the JavaScript engine is seeing; in particular, the return value may not match the original source code if a transpilation tool was used.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isBigInt64Array

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a `Bigint64Array` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isBigUint64Array

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a `BigUint64Array` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isBooleanObject

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a boolean object, e.g. created by `new Boolean()`.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isBoxedPrimitive

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is any boxed primitive object, e.g. created by `new Boolean()`, `new String()` or `Object(Symbol())`.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isDataView

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `DataView` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isDate

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Date` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isFloat32Array

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Float32Array` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isFloat64Array

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Float64Array` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isGeneratorFunction

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a generator function. This only reports back what the JavaScript engine is seeing; in particular, the return value may not match the original source code if a transpilation tool was used.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isGeneratorObject

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a generator object as returned from a built-in generator function. This only reports back what the JavaScript engine is seeing; in particular, the return value may not match the original source code if a transpilation tool was used.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isInt16Array

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Int16Array` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isInt32Array

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Int32Array` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isInt8Array

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Int8Array` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isMap

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Map` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isMapIterator

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is an iterator returned for a built-in `Map` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isNativeError

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is an instance of a built-in `Error` type.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isNumberObject

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a number object, e.g. created by `new Number()`.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isPromise

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Promise`.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isRegExp

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a regular expression object.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isSet

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Set` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isSetIterator

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is an iterator returned for a built-in `Set` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isSharedArrayBuffer

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `SharedArrayBuffer` instance. This does not include `ArrayBuffer` instances. Usually, it is desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isStringObject

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a string object, e.g. created by new `String()`.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isSymbolObject

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a symbol object, created by calling `Object()` on a `Symbol` primitive.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isTypedArray

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `TypedArray` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isUint16Array

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Uint16Array` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isUint32Array

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Uint32Array` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isUint8Array

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Uint8Array` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isUint8ClampedArray

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `Uint8ClampedArray` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isWeakMap

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `WeakMap` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

### isWeakSet

- Platforms: Android, iPhone, iPad, macOS

Returns `true` if the `value` is a built-in `WeakSet` instance.

Parameters:

- `value` (any): value to check

Returns: Boolean

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

