@stdlib/assert
v0.3.3
Published
Standard assertion utilities.
Downloads
78,749
Readme
Assert
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url]
Assertion utilities.
Installation
npm install @stdlib/assert
Usage
var assert = require( '@stdlib/assert' );
assert
Namespace providing utilities for data type testing and feature detection.
var o = assert;
// returns {...}
To validate the built-in JavaScript data types, the namespace includes the following assertion utilities:
- [
isArray( value )
][@stdlib/assert/is-array]: test if a value is an array. - [
isBoolean( value )
][@stdlib/assert/is-boolean]: test if a value is a boolean. - [
isDateObject( value )
][@stdlib/assert/is-date-object]: test if a value is a Date object. - [
isFunction( value )
][@stdlib/assert/is-function]: test if a value is a function. - [
isnan( value )
][@stdlib/assert/is-nan]: test if a value is NaN. - [
isNull( value )
][@stdlib/assert/is-null]: test if a value is null. - [
isNumber( value )
][@stdlib/assert/is-number]: test if a value is a number. - [
isObject( value )
][@stdlib/assert/is-object]: test if a value is an object. - [
isRegExp( value )
][@stdlib/assert/is-regexp]: test if a value is a regular expression. - [
isString( value )
][@stdlib/assert/is-string]: test if a value is a string. - [
isSymbol( value )
][@stdlib/assert/is-symbol]: test if a value is a symbol. - [
isUndefined( value )
][@stdlib/assert/is-undefined]: test if a value is undefined.
For primitive types having corresponding object wrappers, assertion utilities provide isObject
and isPrimitive
methods to test for either objects or primitives, respectively.
var Boolean = require( '@stdlib/boolean/ctor' );
var isBoolean = require( '@stdlib/assert/is-boolean' );
var bool = isBoolean.isObject( new Boolean( false ) );
// returns true
bool = isBoolean.isObject( false );
// returns false
bool = isBoolean.isPrimitive( false );
// returns true
Many of the assertion utilities have corresponding packages that test whether array elements are of the given data type:
- [
isArrayArray( value )
][@stdlib/assert/is-array-array]: test if a value is an array of arrays. - [
isBooleanArray( value )
][@stdlib/assert/is-boolean-array]: test if a value is an array-like object of booleans. - [
isDateObjectArray( value )
][@stdlib/assert/is-date-object-array]: test if a value is an array-like object containing only Date objects. - [
isFunctionArray( value )
][@stdlib/assert/is-function-array]: test if a value is an array-like object containing only functions. - [
isNaNArray( value )
][@stdlib/assert/is-nan-array]: test if a value is an array-like object containing only NaN values. - [
isNullArray( value )
][@stdlib/assert/is-null-array]: test if a value is an array-like object containing only null values. - [
isNumberArray( value )
][@stdlib/assert/is-number-array]: test if a value is an array-like object of numbers. - [
isObjectArray( value )
][@stdlib/assert/is-object-array]: test if a value is an array-like object containing only objects. - [
isStringArray( value )
][@stdlib/assert/is-string-array]: test if a value is an array of strings. - [
isSymbolArray( value )
][@stdlib/assert/is-symbol-array]: test if a value is an array-like object containing only symbols.
Where applicable, similar to the assertion utilities for built-in data types, array assertion utilities provides methods for testing for an array of primitives or objects.
var isStringArray = require( '@stdlib/assert/is-string-array' );
var bool = isStringArray( [ 'hello', 'world' ] );
// returns true
bool = isStringArray.primitives( [ 'hello', 'world' ] );
// returns true
bool = isStringArray.objects( [ 'hello', 'world' ] );
// returns false
bool = isStringArray.objects( [ new String( 'hello' ), new String( 'world' ) ] );
// returns true
The namespace also contains utilities to test for numbers within a certain range or for numbers satisfying a particular "type":
- [
isCubeNumber( value )
][@stdlib/assert/is-cube-number]: test if a value is a cube number. - [
isIntegerArray( value )
][@stdlib/assert/is-integer-array]: test if a value is an array-like object containing only integers. - [
isInteger( value )
][@stdlib/assert/is-integer]: test if a value is a number having an integer value. - [
isNegativeIntegerArray( value )
][@stdlib/assert/is-negative-integer-array]: test if a value is an array-like object containing only negative integers. - [
isNegativeInteger( value )
][@stdlib/assert/is-negative-integer]: test if a value is a number having a negative integer value. - [
isNegativeNumberArray( value )
][@stdlib/assert/is-negative-number-array]: test if a value is an array-like object containing only negative numbers. - [
isNegativeNumber( value )
][@stdlib/assert/is-negative-number]: test if a value is a number having a negative value. - [
isNonNegativeIntegerArray( value )
][@stdlib/assert/is-nonnegative-integer-array]: test if a value is an array-like object containing only nonnegative integers. - [
isNonNegativeInteger( value )
][@stdlib/assert/is-nonnegative-integer]: test if a value is a number having a nonnegative integer value. - [
isNonNegativeNumberArray( value )
][@stdlib/assert/is-nonnegative-number-array]: test if a value is an array-like object containing only nonnegative numbers. - [
isNonNegativeNumber( value )
][@stdlib/assert/is-nonnegative-number]: test if a value is a number having a nonnegative value. - [
isNonPositiveIntegerArray( value )
][@stdlib/assert/is-nonpositive-integer-array]: test if a value is an array-like object containing only nonpositive integers. - [
isNonPositiveInteger( value )
][@stdlib/assert/is-nonpositive-integer]: test if a value is a number having a nonpositive integer value. - [
isNonPositiveNumberArray( value )
][@stdlib/assert/is-nonpositive-number-array]: test if a value is an array-like object containing only nonpositive numbers. - [
isNonPositiveNumber( value )
][@stdlib/assert/is-nonpositive-number]: test if a value is a number having a nonpositive value. - [
isPositiveIntegerArray( value )
][@stdlib/assert/is-positive-integer-array]: test if a value is an array-like object containing only positive integers. - [
isPositiveInteger( value )
][@stdlib/assert/is-positive-integer]: test if a value is a number having a positive integer value. - [
isPositiveNumberArray( value )
][@stdlib/assert/is-positive-number-array]: test if a value is an array-like object containing only positive numbers. - [
isPositiveNumber( value )
][@stdlib/assert/is-positive-number]: test if a value is a number having a positive value. - [
isSafeIntegerArray( value )
][@stdlib/assert/is-safe-integer-array]: test if a value is an array-like object containing only safe integers. - [
isSafeInteger( value )
][@stdlib/assert/is-safe-integer]: test if a value is a number having a safe integer value. - [
isSquareNumber( value )
][@stdlib/assert/is-square-number]: test if a value is a square number. - [
isSquareTriangularNumber( value )
][@stdlib/assert/is-square-triangular-number]: test if a value is a square triangular number. - [
isTriangularNumber( value )
][@stdlib/assert/is-triangular-number]: test if a value is a triangular number.
The namespace provides utilities for validating typed arrays:
- [
isFloat32Array( value )
][@stdlib/assert/is-float32array]: test if a value is a Float32Array. - [
isFloat64Array( value )
][@stdlib/assert/is-float64array]: test if a value is a Float64Array. - [
isInt16Array( value )
][@stdlib/assert/is-int16array]: test if a value is an Int16Array. - [
isInt32Array( value )
][@stdlib/assert/is-int32array]: test if a value is an Int32Array. - [
isInt8Array( value )
][@stdlib/assert/is-int8array]: test if a value is an Int8Array. - [
isUint16Array( value )
][@stdlib/assert/is-uint16array]: test if a value is a Uint16Array. - [
isUint32Array( value )
][@stdlib/assert/is-uint32array]: test if a value is a Uint32Array. - [
isUint8Array( value )
][@stdlib/assert/is-uint8array]: test if a value is a Uint8Array. - [
isUint8ClampedArray( value )
][@stdlib/assert/is-uint8clampedarray]: test if a value is a Uint8ClampedArray.
The namespace includes utilities for validating ndarray
s (n-dimensional arrays).
- [
isCentrosymmetricMatrix( value )
][@stdlib/assert/is-centrosymmetric-matrix]: test if a value is a centrosymmetric matrix. - [
isComplex128MatrixLike( value )
][@stdlib/assert/is-complex128matrix-like]: test if a value is a 2-dimensional ndarray-like object containing double-precision complex floating-point numbers. - [
isComplex128ndarrayLike( value )
][@stdlib/assert/is-complex128ndarray-like]: test if a value is an ndarray-like object containing double-precision complex floating-point numbers. - [
isComplex128VectorLike( value )
][@stdlib/assert/is-complex128vector-like]: test if a value is a 1-dimensional ndarray-like object containing double-precision complex floating-point numbers. - [
isComplex64MatrixLike( value )
][@stdlib/assert/is-complex64matrix-like]: test if a value is a 2-dimensional ndarray-like object containing single-precision complex floating-point numbers. - [
isComplex64ndarrayLike( value )
][@stdlib/assert/is-complex64ndarray-like]: test if a value is an ndarray-like object containing single-precision complex floating-point numbers. - [
isComplex64VectorLike( value )
][@stdlib/assert/is-complex64vector-like]: test if a value is a 1-dimensional ndarray-like object containing single-precision complex floating-point numbers. - [
isFloat32MatrixLike( value )
][@stdlib/assert/is-float32matrix-like]: test if a value is a 2-dimensional ndarray-like object containing single-precision floating-point numbers. - [
isFloat32ndarrayLike( value )
][@stdlib/assert/is-float32ndarray-like]: test if a value is an ndarray-like object containing single-precision floating-point numbers. - [
isFloat32VectorLike( value )
][@stdlib/assert/is-float32vector-like]: test if a value is a 1-dimensional ndarray-like object containing single-precision floating-point numbers. - [
isFloat64MatrixLike( value )
][@stdlib/assert/is-float64matrix-like]: test if a value is a 2-dimensional ndarray-like object containing double-precision floating-point numbers. - [
isFloat64ndarrayLike( value )
][@stdlib/assert/is-float64ndarray-like]: test if a value is an ndarray-like object containing double-precision floating-point numbers. - [
isFloat64VectorLike( value )
][@stdlib/assert/is-float64vector-like]: test if a value is a 1-dimensional ndarray-like object containing double-precision floating-point numbers. - [
isMatrixLike( value )
][@stdlib/assert/is-matrix-like]: test if a value is 2-dimensional ndarray-like object. - [
isndarrayLike( value )
][@stdlib/assert/is-ndarray-like]: test if a value is ndarray-like. - [
isNonSymmetricMatrix( value )
][@stdlib/assert/is-nonsymmetric-matrix]: test if a value is a non-symmetric matrix. - [
isPersymmetricMatrix( value )
][@stdlib/assert/is-persymmetric-matrix]: test if a value is a persymmetric matrix. - [
isSkewCentrosymmetricMatrix( value )
][@stdlib/assert/is-skew-centrosymmetric-matrix]: test if a value is a skew-centrosymmetric matrix. - [
isSkewPersymmetricMatrix( value )
][@stdlib/assert/is-skew-persymmetric-matrix]: test if a value is a skew-persymmetric matrix. - [
isSkewSymmetricMatrix( value )
][@stdlib/assert/is-skew-symmetric-matrix]: test if a value is a skew-symmetric matrix. - [
isSquareMatrix( value )
][@stdlib/assert/is-square-matrix]: test if a value is a 2-dimensional ndarray-like object having equal dimensions. - [
isSymmetricMatrix( value )
][@stdlib/assert/is-symmetric-matrix]: test if a value is a symmetric matrix. - [
isVectorLike( value )
][@stdlib/assert/is-vector-like]: test if a value is a 1-dimensional ndarray-like object.
The namespace includes utilities for validating complex numbers and arrays of complex numbers:
- [
isComplexLike( value )
][@stdlib/assert/is-complex-like]: test if a value is a complex number-like object. - [
isComplexTypedArrayLike( value )
][@stdlib/assert/is-complex-typed-array-like]: test if a value is complex-typed-array-like. - [
isComplexTypedArray( value )
][@stdlib/assert/is-complex-typed-array]: test if a value is a complex typed array. - [
isComplex( value )
][@stdlib/assert/is-complex]: test if a value is a 64-bit or 128-bit complex number. - [
isComplex128( value )
][@stdlib/assert/is-complex128]: test if a value is a 128-bit complex number. - [
isComplex128Array( value )
][@stdlib/assert/is-complex128array]: test if a value is a Complex128Array. - [
isComplex64( value )
][@stdlib/assert/is-complex64]: test if a value is a 64-bit complex number. - [
isComplex64Array( value )
][@stdlib/assert/is-complex64array]: test if a value is a Complex64Array.
The namespace includes utilities for validating other special arrays or buffers:
- [
isAccessorArray( value )
][@stdlib/assert/is-accessor-array]: test if a value is an array-like object supporting the accessor (get/set) protocol. - [
isArrayLength( value )
][@stdlib/assert/is-array-length]: test if a value is a valid array length. - [
isArrayLikeObject( value )
][@stdlib/assert/is-array-like-object]: test if a value is an array-like object. - [
isArrayLike( value )
][@stdlib/assert/is-array-like]: test if a value is array-like. - [
isArrayBufferView( value )
][@stdlib/assert/is-arraybuffer-view]: test if a value is an ArrayBuffer view. - [
isArrayBuffer( value )
][@stdlib/assert/is-arraybuffer]: test if a value is an ArrayBuffer. - [
isBetweenArray( value, a, b[, left, right] )
][@stdlib/assert/is-between-array]: test if a value is an array-like object where every element is between two values. - [
isBigInt64Array( value )
][@stdlib/assert/is-bigint64array]: test if a value is a BigInt64Array. - [
isBigUint64Array( value )
][@stdlib/assert/is-biguint64array]: test if a value is a BigUint64Array. - [
isCircularArray( value )
][@stdlib/assert/is-circular-array]: test if a value is an array containing a circular reference. - [
isEmptyArrayLikeObject( value )
][@stdlib/assert/is-empty-array-like-object]: test if a value is an empty array-like object. - [
isEmptyArray( value )
][@stdlib/assert/is-empty-array]: test if a value is an empty array. - [
isFalsyArray( value )
][@stdlib/assert/is-falsy-array]: test if a value is an array-like object containing only falsy values. - [
isFiniteArray( value )
][@stdlib/assert/is-finite-array]: test if a value is an array-like object containing only finite numbers. - [
isNumericArray( value )
][@stdlib/assert/is-numeric-array]: test if a value is a numeric array. - [
isPlainObjectArray( value )
][@stdlib/assert/is-plain-object-array]: test if a value is an array-like object containing only plain objects. - [
isProbabilityArray( value )
][@stdlib/assert/is-probability-array]: test if a value is an array-like object containing only probabilities. - [
isSameArray( v1, v2 )
][@stdlib/assert/is-same-array]: test if two arguments are both generic arrays and have the same values. - [
isSameComplex128Array( v1, v2 )
][@stdlib/assert/is-same-complex128array]: test if two arguments are both Complex128Arrays and have the same values. - [
isSameComplex64Array( v1, v2 )
][@stdlib/assert/is-same-complex64array]: test if two arguments are both Complex64Arrays and have the same values. - [
isSameFloat32Array( v1, v2 )
][@stdlib/assert/is-same-float32array]: test if two arguments are both Float32Arrays and have the same values. - [
isSameFloat64Array( v1, v2 )
][@stdlib/assert/is-same-float64array]: test if two arguments are both Float64Arrays and have the same values. - [
isSharedArrayBuffer( value )
][@stdlib/assert/is-sharedarraybuffer]: test if a value is a SharedArrayBuffer. - [
isTruthyArray( value )
][@stdlib/assert/is-truthy-array]: test if a value is an array-like object containing only truthy values. - [
isTypedArrayLength( value )
][@stdlib/assert/is-typed-array-length]: test if a value is a valid typed array length. - [
isTypedArrayLike( value )
][@stdlib/assert/is-typed-array-like]: test if a value is typed-array-like. - [
isTypedArray( value )
][@stdlib/assert/is-typed-array]: test if a value is a typed array. - [
isUnityProbabilityArray( value )
][@stdlib/assert/is-unity-probability-array]: test if a value is an array of probabilities that sum to one.
To test for error objects, the namespace includes the following utilities:
- [
isError( value )
][@stdlib/assert/is-error]: test if a value is an Error object. - [
isEvalError( value )
][@stdlib/assert/is-eval-error]: test if a value is an EvalError object. - [
isRangeError( value )
][@stdlib/assert/is-range-error]: test if a value is a RangeError object. - [
isReferenceError( value )
][@stdlib/assert/is-reference-error]: test if a value is a ReferenceError object. - [
isSyntaxError( value )
][@stdlib/assert/is-syntax-error]: test if a value is a SyntaxError object. - [
isTypeError( value )
][@stdlib/assert/is-type-error]: test if a value is a TypeError object. - [
isURIError( value )
][@stdlib/assert/is-uri-error]: test if a value is a URIError object.
The namespace exposes the following constants concerning the current running process:
- [
IS_BIG_ENDIAN
][@stdlib/assert/is-big-endian]: check if an environment is big endian. - [
IS_BROWSER
][@stdlib/assert/is-browser]: check if the runtime is a web browser. - [
IS_DARWIN
][@stdlib/assert/is-darwin]: boolean indicating if the current process is running on Darwin. - [
IS_DOCKER
][@stdlib/assert/is-docker]: check if the process is running in a Docker container. - [
IS_ELECTRON_MAIN
][@stdlib/assert/is-electron-main]: check if the runtime is the main Electron process. - [
IS_ELECTRON_RENDERER
][@stdlib/assert/is-electron-renderer]: check if the runtime is the Electron renderer process. - [
IS_ELECTRON
][@stdlib/assert/is-electron]: check if the runtime is Electron. - [
IS_LITTLE_ENDIAN
][@stdlib/assert/is-little-endian]: check if an environment is little endian. - [
IS_MOBILE
][@stdlib/assert/is-mobile]: check if the current environment is a mobile device. - [
IS_NODE
][@stdlib/assert/is-node]: check if the runtime is Node.js. - [
IS_TOUCH_DEVICE
][@stdlib/assert/is-touch-device]: check if the current environment is a touch device. - [
IS_WEB_WORKER
][@stdlib/assert/is-web-worker]: check if the runtime is a web worker. - [
IS_WINDOWS
][@stdlib/assert/is-windows]: boolean indicating if the current process is running on Windows.
To test whether a runtime environment supports certain features, the namespace includes the following utilities:
- [
hasArrayBufferSupport()
][@stdlib/assert/has-arraybuffer-support]: detect nativeArrayBuffer
support. - [
hasArrowFunctionSupport()
][@stdlib/assert/has-arrow-function-support]: detect nativearrow function
support. - [
hasAsyncAwaitSupport()
][@stdlib/assert/has-async-await-support]: detect nativeasync
/await
support. - [
hasAsyncIteratorSymbolSupport()
][@stdlib/assert/has-async-iterator-symbol-support]: detect nativeSymbol.asyncIterator
support. - [
hasBigIntSupport()
][@stdlib/assert/has-bigint-support]: detect nativeBigInt
support. - [
hasBigInt64ArraySupport()
][@stdlib/assert/has-bigint64array-support]: detect nativeBigInt64Array
support. - [
hasBigUint64ArraySupport()
][@stdlib/assert/has-biguint64array-support]: detect nativeBigUint64Array
support. - [
hasClassSupport()
][@stdlib/assert/has-class-support]: detect nativeclass
support. - [
hasDataViewSupport()
][@stdlib/assert/has-dataview-support]: detect nativeDataView
support. - [
hasDefinePropertiesSupport()
][@stdlib/assert/has-define-properties-support]: detectObject.defineProperties
support. - [
hasDefinePropertySupport()
][@stdlib/assert/has-define-property-support]: detectObject.defineProperty
support. - [
hasFloat32ArraySupport()
][@stdlib/assert/has-float32array-support]: detect nativeFloat32Array
support. - [
hasFloat64ArraySupport()
][@stdlib/assert/has-float64array-support]: detect nativeFloat64Array
support. - [
hasFunctionNameSupport()
][@stdlib/assert/has-function-name-support]: detect native functionname
support. - [
hasGeneratorSupport()
][@stdlib/assert/has-generator-support]: detect nativegenerator function
support. - [
hasGlobalThisSupport()
][@stdlib/assert/has-globalthis-support]: detectglobalThis
support. - [
hasInt16ArraySupport()
][@stdlib/assert/has-int16array-support]: detect nativeInt16Array
support. - [
hasInt32ArraySupport()
][@stdlib/assert/has-int32array-support]: detect nativeInt32Array
support. - [
hasInt8ArraySupport()
][@stdlib/assert/has-int8array-support]: detect nativeInt8Array
support. - [
hasIteratorSymbolSupport()
][@stdlib/assert/has-iterator-symbol-support]: detect nativeSymbol.iterator
support. - [
hasMapSupport()
][@stdlib/assert/has-map-support]: detect nativeMap
support. - [
hasNodeBufferSupport()
][@stdlib/assert/has-node-buffer-support]: detect nativeBuffer
support. - [
hasProxySupport()
][@stdlib/assert/has-proxy-support]: detect nativeProxy
support. - [
hasSetSupport()
][@stdlib/assert/has-set-support]: detect nativeSet
support. - [
hasSharedArrayBufferSupport()
][@stdlib/assert/has-sharedarraybuffer-support]: detect nativeSharedArrayBuffer
support. - [
hasSymbolSupport()
][@stdlib/assert/has-symbol-support]: detect nativeSymbol
support. - [
hasToStringTagSupport()
][@stdlib/assert/has-tostringtag-support]: detect nativeSymbol.toStringTag
support. - [
hasUint16ArraySupport()
][@stdlib/assert/has-uint16array-support]: detect nativeUint16Array
support. - [
hasUint32ArraySupport()
][@stdlib/assert/has-uint32array-support]: detect nativeUint32Array
support. - [
hasUint8ArraySupport()
][@stdlib/assert/has-uint8array-support]: detect nativeUint8Array
support. - [
hasUint8ClampedArraySupport()
][@stdlib/assert/has-uint8clampedarray-support]: detect nativeUint8ClampedArray
support. - [
hasWebAssemblySupport()
][@stdlib/assert/has-wasm-support]: detect native WebAssembly support. - [
hasWeakMapSupport()
][@stdlib/assert/has-weakmap-support]: detect nativeWeakMap
support. - [
hasWeakSetSupport()
][@stdlib/assert/has-weakset-support]: detect nativeWeakSet
support.
The remaining namespace utilities are as follows:
- [
contains( val, searchValue[, position] )
][@stdlib/assert/contains]: test if an array-like value contains a search value. - [
deepEqual( a, b )
][@stdlib/assert/deep-equal]: test for deep equality between two values. - [
deepHasOwnProp( value, path[, options] )
][@stdlib/assert/deep-has-own-property]: test whether an object contains a nested key path. - [
deepHasProp( value, path[, options] )
][@stdlib/assert/deep-has-property]: test whether an object contains a nested key path, either own or inherited. - [
hasOwnProp( value, property )
][@stdlib/assert/has-own-property]: test if an object has a specified property. - [
hasProp( value, property )
][@stdlib/assert/has-property]: test if an object has a specified property, either own or inherited. - [
hasUTF16SurrogatePairAt( string, position )
][@stdlib/assert/has-utf16-surrogate-pair-at]: test if a position in a string marks the start of a UTF-16 surrogate pair. - [
instanceOf( value, constructor )
][@stdlib/assert/instance-of]: test whether a value has in its prototype chain a specified constructor as a prototype property. - [
isAbsoluteHttpURI( value )
][@stdlib/assert/is-absolute-http-uri]: test whether a value is an absolute HTTP(S) URI. - [
isAbsolutePath( value )
][@stdlib/assert/is-absolute-path]: test if a value is an absolute path. - [
isAbsoluteURI( value )
][@stdlib/assert/is-absolute-uri]: test whether a value is an absolute URI. - [
isAccessorPropertyIn( value, property )
][@stdlib/assert/is-accessor-property-in]: test if an object's own or inherited property has an accessor descriptor. - [
isAccessorProperty( value, property )
][@stdlib/assert/is-accessor-property]: test if an object's own property has an accessor descriptor. - [
isAlphagram( value )
][@stdlib/assert/is-alphagram]: test if a value is an alphagram. - [
isAlphaNumeric( value )
][@stdlib/assert/is-alphanumeric]: test whether a string contains only alphanumeric characters. - [
isAnagram( str, value )
][@stdlib/assert/is-anagram]: test if a value is an anagram. - [
isArguments( value )
][@stdlib/assert/is-arguments]: test if a value is an arguments object. - [
isArrowFunction( value )
][@stdlib/assert/is-arrow-function]: test if a value is anarrow function
. - [
isASCII( value )
][@stdlib/assert/is-ascii]: test whether a character belongs to the ASCII character set and whether this is true for all characters in a provided string. - [
isBetween( value, a, b[, left, right] )
][@stdlib/assert/is-between]: test if a value is between two values. - [
isBigInt( value )
][@stdlib/assert/is-bigint]: test if a value is a BigInt. - [
isBinaryString( value )
][@stdlib/assert/is-binary-string]: test if a value is a binary string. - [
isBlankString( value )
][@stdlib/assert/is-blank-string]: test if a value is a blank string. - [
isBoxedPrimitive( value )
][@stdlib/assert/is-boxed-primitive]: test if a value is a JavaScript boxed primitive. - [
isBuffer( value )
][@stdlib/assert/is-buffer]: test if a value is a Buffer object. - [
isCamelcase( value )
][@stdlib/assert/is-camelcase]: test if a value is a camelcase string. - [
isCapitalized( value )
][@stdlib/assert/is-capitalized]: test if a value is a string having an uppercase first character. - [
isCircular( value )
][@stdlib/assert/is-circular]: test if a value is a plain object containing a circular reference. - [
isCircular( value )
][@stdlib/assert/is-circular]: test if an object-like value contains a circular reference. - [
isClass( value )
][@stdlib/assert/is-class]: test if a value is a class. - [
isCollection( value )
][@stdlib/assert/is-collection]: test if a value is a collection. - [
isComposite( value )
][@stdlib/assert/is-composite]: test if a value is a composite number. - [
isConfigurablePropertyIn( value, property )
][@stdlib/assert/is-configurable-property-in]: test if an object's own or inherited property is configurable. - [
isConfigurableProperty( value, property )
][@stdlib/assert/is-configurable-property]: test if an object's own property is configurable. - [
isConstantcase( value )
][@stdlib/assert/is-constantcase]: test if a value is a constantcase string. - [
isCurrentYear( value )
][@stdlib/assert/is-current-year]: test if a value is the current year. - [
isDataPropertyIn( value, property )
][@stdlib/assert/is-data-property-in]: test if an object's own or inherited property has a data descriptor. - [
isDataProperty( value, property )
][@stdlib/assert/is-data-property]: test if an object's own property has a data descriptor. - [
isDataView( value )
][@stdlib/assert/is-dataview]: test if a value is a DataView. - [
isDigitString( value )
][@stdlib/assert/is-digit-string]: test whether a string contains only numeric digits. - [
isDomainName( value )
][@stdlib/assert/is-domain-name]: test if a value is a domain name. - [
isDurationString( value )
][@stdlib/assert/is-duration-string]: test if a value is a duration string. - [
isEmailAddress( value )
][@stdlib/assert/is-email-address]: test if a value is an email address. - [
isEmptyCollection( value )
][@stdlib/assert/is-empty-collection]: test if a value is an empty collection. - [
isEmptyObject( value )
][@stdlib/assert/is-empty-object]: test if a value is an empty object. - [
isEmptyString( value )
][@stdlib/assert/is-empty-string]: test if a value is an empty string. - [
isEnumerablePropertyIn( value, property )
][@stdlib/assert/is-enumerable-property-in]: test if an object's own or inherited property is enumerable. - [
isEnumerableProperty( value, property )
][@stdlib/assert/is-enumerable-property]: test if an object's own property is enumerable. - [
isEven( value )
][@stdlib/assert/is-even]: test if a value is an even number. - [
isFalsy( value )
][@stdlib/assert/is-falsy]: test if a value is falsy. - [
isFinite( value )
][@stdlib/assert/is-finite]: test if a value is a finite number. - [
isGeneratorObjectLike( value )
][@stdlib/assert/is-generator-object-like]: test if a value isgenerator
object-like. - [
isGeneratorObject( value )
][@stdlib/assert/is-generator-object]: test if a value is agenerator
object. - [
isgzipBuffer( value )
][@stdlib/assert/is-gzip-buffer]: test if a value is a gzip buffer. - [
isHexString( value )
][@stdlib/assert/is-hex-string]: test whether a string contains only hexadecimal digits. - [
isInfinite( value )
][@stdlib/assert/is-infinite]: test if a value is an infinite number. - [
isInheritedProperty( value, property )
][@stdlib/assert/is-inherited-property]: test if an object has an inherited property. - [
isIterableLike( value )
][@stdlib/assert/is-iterable-like]: test if a value isiterable
-like. - [
isIteratorLike( value )
][@stdlib/assert/is-iterator-like]: test if a value isiterator
-like. - [
isJSON( value )
][@stdlib/assert/is-json]: test if a value is a parseable JSON string. - [
isKebabcase( value )
][@stdlib/assert/is-kebabcase]: test if a value is a string in kebab case. - [
isLeapYear( [value] )
][@stdlib/assert/is-leap-year]: test if a value corresponds to a leap year in the Gregorian calendar. - [
isLocalhost( value )
][@stdlib/assert/is-localhost]: test whether a value is a localhost hostname. - [
isLowercase( value )
][@stdlib/assert/is-lowercase]: test if a value is a lowercase string. - [
isMethodIn( value, property )
][@stdlib/assert/is-method-in]: test if an object has a specified method name, either own or inherited. - [
isMethod( value, property )
][@stdlib/assert/is-method]: test if an object has a specified method name. - [
isMultiSlice( value )
][@stdlib/assert/is-multi-slice]: test if a value is aMultiSlice
. - [
isNamedTypedTupleLike( value )
][@stdlib/assert/is-named-typed-tuple-like]: test if a value is named typed tuple-like. - [
isNativeFunction( value )
][@stdlib/assert/is-native-function]: test if a value is a native function. - [
isNegativeZero( value )
][@stdlib/assert/is-negative-zero]: test if a value is a number equal to negative zero. - [
isNodeBuiltin( value )
][@stdlib/assert/is-node-builtin]: test whether a string matches a Node.js built-in module name. - [
isNodeDuplexStreamLike( value )
][@stdlib/assert/is-node-duplex-stream-like]: test if a value is Node duplex stream-like. - [
isNodeReadableStreamLike( value )
][@stdlib/assert/is-node-readable-stream-like]: test if a value is Node readable stream-like. - [
isNodeREPL()
][@stdlib/assert/is-node-repl]: check if running in a Node.js REPL environment. - [
isNodeStreamLike( value )
][@stdlib/assert/is-node-stream-like]: test if a value is Node stream-like. - [
isNodeTransformStreamLike( value )
][@stdlib/assert/is-node-transform-stream-like]: test if a value is Node transform stream-like. - [
isNodeWritableStreamLike( value )
][@stdlib/assert/is-node-writable-stream-like]: test if a value is Node writable stream-like. - [
isNonConfigurablePropertyIn( value, property )
][@stdlib/assert/is-nonconfigurable-property-in]: test if an object's own or inherited property is non-configurable. - [
isNonConfigurableProperty( value, property )
][@stdlib/assert/is-nonconfigurable-property]: test if an object's own property is non-configurable. - [
isNonEnumerablePropertyIn( value, property )
][@stdlib/assert/is-nonenumerable-property-in]: test if an object's own or inherited property is non-enumerable. - [
isNonEnumerableProperty( value, property )
][@stdlib/assert/is-nonenumerable-property]: test if an object's own property is non-enumerable. - [
isNonNegativeFinite( value )
][@stdlib/assert/is-nonnegative-finite]: test if a value is a number having a nonnegative finite value. - [
isObjectLike( value )
][@stdlib/assert/is-object-like]: test if a value is object-like. - [
isOdd( value )
][@stdlib/assert/is-odd]: test if a value is an odd number. - [
isPascalcase( value )
][@stdlib/assert/is-pascalcase]: test if a value is a string in Pascal case. - [
isPlainObject( value )
][@stdlib/assert/is-plain-object]: test if a value is a plain object. - [
isPositiveZero( value )
][@stdlib/assert/is-positive-zero]: test if a value is a number equal to positive zero. - [
isPrime( value )
][@stdlib/assert/is-prime]: test if a value is a prime number. - [
isPrimitive( value )
][@stdlib/assert/is-primitive]: test if a value is a JavaScript primitive. - [
isPRNGLike( value )
][@stdlib/assert/is-prng-like]: test if a value is PRNG-like. - [
isProbability( value )
][@stdlib/assert/is-probability]: test if a value is a probability. - [
isPropertyKey( value )
][@stdlib/assert/is-property-key]: test whether a value is a property key. - [
isPrototypeOf( obj, prototype )
][@stdlib/assert/is-prototype-of]: test if an object's prototype chain contains a provided prototype. - [
isReadOnlyPropertyIn( value, property )
][@stdlib/assert/is-read-only-property-in]: test if an object's own or inherited property is read-only. - [
isReadOnlyProperty( value, property )
][@stdlib/assert/is-read-only-property]: test if an object's own property is read-only. - [
isReadWritePropertyIn( value, property )
][@stdlib/assert/is-read-write-property-in]: test if an object's own or inherited property is readable and writable. - [
isReadWriteProperty( value, property )
][@stdlib/assert/is-read-write-property]: test if an object's own property is readable and writable. - [
isReadablePropertyIn( value, property )
][@stdlib/assert/is-readable-property-in]: test if an object's own or inherited property is readable. - [
isReadableProperty( value, property )
][@stdlib/assert/is-readable-property]: test if an object's own property is readable. - [
isRegExpString( value )
][@stdlib/assert/is-regexp-string]: test if a value is a regular expression string. - [
isRelativePath( value )
][@stdlib/assert/is-relative-path]: test if a value is a relative path. - [
isRelativeURI( value )
][@stdlib/assert/is-relative-uri]: test whether a value is a relative URI. - [
isSameComplex128( v1, v2 )
][@stdlib/assert/is-same-complex128]: test if two arguments are both double-precision complex floating-point numbers and have the same value. - [
isSameComplex64( v1, v2 )
][@stdlib/assert/is-same-complex64]: test if two arguments are both single-precision complex floating-point numbers and have the same value. - [
isSameNativeClass( a, b )
][@stdlib/assert/is-same-native-class]: test if two arguments have the same native class. - [
isSameType( a, b )
][@stdlib/assert/is-same-type]: test if two arguments have the same type. - [
isSameValueZero( a, b )
][@stdlib/assert/is-same-value-zero]: test if two arguments are the same value. - [
isSameValue( a, b )
][@stdlib/assert/is-same-value]: test if two arguments are the same value. - [`isS