UNPKG

545 BJavaScriptView Raw
1// Copyright 2017-2022 @polkadot/util authors & contributors
2// SPDX-License-Identifier: Apache-2.0
3
4/**
5 * @name isUndefined
6 * @summary Tests for a `undefined` values.
7 * @description
8 * Checks to see if the input value is `undefined`.
9 * @example
10 * <BR>
11 *
12 * ```javascript
13 * import { isUndefined } from '@polkadot/util';
14 *
15 * console.log('isUndefined', isUndefined(void(0))); // => true
16 * ```
17 */
18// eslint-disable-next-line @typescript-eslint/no-explicit-any
19export function isUndefined(value) {
20 return typeof value === 'undefined';
21}
\No newline at end of file