Package Exports
- @silen/is-undefined
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@silen/is-undefined) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
is-undefined
Determine if a value is Undefined
install
npm i @silen/is-undefinedapi
declare function isUndefined(val: any): boolean;
usage
const { isUndefined } = require('@silen/is-undefined');
// or
import { isUndefined } from '@silen/is-undefined';
console.log(isUndefined(new Buffer(4)));
console.log(isUndefined(Buffer.alloc(4)));
console.log(isUndefined(undefined));
console.log(isUndefined(null));
console.log(isUndefined(''));
console.log(isUndefined(true));
console.log(isUndefined(0));
console.log(isUndefined(1));
console.log(isUndefined(1.0));
console.log(isUndefined('string'));
console.log(isUndefined({}));
console.log(isUndefined(function foo() {}));
console.log(isUndefined(Symbol()));
console.log(isUndefined(new Set));
console.log(isUndefined(new Map));
console.log(isUndefined(new WeakMap));
console.log(isUndefined(new WeakSet));
// or
console.log(window.Type.isUndefined(new WeakSet));This is a demo for testing the usage of isUndefined from @silen/is-undefined module. You can try the others and do likewise.
others
- type
- isArray
- isNull
- isBoolean
- isBuffer
- isArrayBuffer
- isFormData
- isArrayBufferView
- isString
- isNumber
- isObject
- isPlainObject
- isDate
- isArguments
- isFile
- isBlob
- isFunction
- isSymbol
- isRegExp
- isInt8Array
- isUint8Array
- isUint8ClampedArray
- isInt16Array
- isUint16Array
- isInt32Array
- isUint32Array
- isFloat32Array
- isFloat64Array
- isError
- isPromise
- isSet
- isWeakSet
- isMap
- isWeakMap
- isStream
- isURLSearchParams