@polkadot/util
Version:
A collection of useful utilities for @polkadot
28 lines (25 loc) • 654 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isUndefined = isUndefined;
// Copyright 2017-2022 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
/**
* @name isUndefined
* @summary Tests for a `undefined` values.
* @description
* Checks to see if the input value is `undefined`.
* @example
* <BR>
*
* ```javascript
* import { isUndefined } from '@polkadot/util';
*
* console.log('isUndefined', isUndefined(void(0))); // => true
* ```
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function isUndefined(value) {
return typeof value === 'undefined';
}