|
||
---|---|---|
.. | ||
contains | ||
deep-equal | ||
deep-has-own-property | ||
deep-has-property | ||
docs/types | ||
has-arraybuffer-support | ||
has-arrow-function-support | ||
has-async-await-support | ||
has-async-iterator-symbol-support | ||
has-bigint-support | ||
has-bigint64array-support | ||
has-biguint64array-support | ||
has-class-support | ||
has-dataview-support | ||
has-define-properties-support | ||
has-define-property-support | ||
has-float32array-support | ||
has-float64array-support | ||
has-function-name-support | ||
has-generator-support | ||
has-globalthis-support | ||
has-int8array-support | ||
has-int16array-support | ||
has-int32array-support | ||
has-iterator-symbol-support | ||
has-map-support | ||
has-node-buffer-support | ||
has-own-property | ||
has-property | ||
has-proxy-support | ||
has-set-support | ||
has-sharedarraybuffer-support | ||
has-symbol-support | ||
has-tostringtag-support | ||
has-uint8array-support | ||
has-uint8clampedarray-support | ||
has-uint16array-support | ||
has-uint32array-support | ||
has-utf16-surrogate-pair-at | ||
has-wasm-support | ||
has-weakmap-support | ||
has-weakset-support | ||
instance-of | ||
is-absolute-path | ||
is-accessor-property | ||
is-accessor-property-in | ||
is-alphagram | ||
is-alphanumeric | ||
is-anagram | ||
is-arguments | ||
is-array | ||
is-array-array | ||
is-array-length | ||
is-array-like | ||
is-array-like-object | ||
is-arraybuffer | ||
is-arraybuffer-view | ||
is-arrow-function | ||
is-ascii | ||
is-between | ||
is-between-array | ||
is-big-endian | ||
is-bigint | ||
is-bigint64array | ||
is-biguint64array | ||
is-binary-string | ||
is-boolean | ||
is-boolean-array | ||
is-boxed-primitive | ||
is-browser | ||
is-buffer | ||
is-capitalized | ||
is-centrosymmetric-matrix | ||
is-circular | ||
is-circular-array | ||
is-circular-plain-object | ||
is-class | ||
is-collection | ||
is-complex | ||
is-complex-like | ||
is-complex-typed-array | ||
is-complex-typed-array-like | ||
is-complex64 | ||
is-complex64array | ||
is-complex128 | ||
is-complex128array | ||
is-composite | ||
is-configurable-property | ||
is-configurable-property-in | ||
is-cube-number | ||
is-darwin | ||
is-data-property | ||
is-data-property-in | ||
is-dataview | ||
is-date-object | ||
is-date-object-array | ||
is-digit-string | ||
is-docker | ||
is-electron | ||
is-electron-main | ||
is-electron-renderer | ||
is-email-address | ||
is-empty-array | ||
is-empty-object | ||
is-empty-string | ||
is-enumerable-property | ||
is-enumerable-property-in | ||
is-error | ||
is-eval-error | ||
is-even | ||
is-falsy | ||
is-falsy-array | ||
is-finite | ||
is-finite-array | ||
is-float32array | ||
is-float32matrix-like | ||
is-float32ndarray-like | ||
is-float32vector-like | ||
is-float64array | ||
is-float64matrix-like | ||
is-float64ndarray-like | ||
is-float64vector-like | ||
is-function | ||
is-function-array | ||
is-generator-object | ||
is-generator-object-like | ||
is-gzip-buffer | ||
is-hex-string | ||
is-infinite | ||
is-inherited-property | ||
is-int8array | ||
is-int16array | ||
is-int32array | ||
is-integer | ||
is-integer-array | ||
is-iterable-like | ||
is-iterator-like | ||
is-json | ||
is-leap-year | ||
is-little-endian | ||
is-lowercase | ||
is-matrix-like | ||
is-method | ||
is-method-in | ||
is-mobile | ||
is-named-typed-tuple-like | ||
is-nan | ||
is-nan-array | ||
is-native-function | ||
is-ndarray-like | ||
is-negative-integer | ||
is-negative-integer-array | ||
is-negative-number | ||
is-negative-number-array | ||
is-negative-zero | ||
is-node | ||
is-node-builtin | ||
is-node-duplex-stream-like | ||
is-node-readable-stream-like | ||
is-node-repl | ||
is-node-stream-like | ||
is-node-transform-stream-like | ||
is-node-writable-stream-like | ||
is-nonconfigurable-property | ||
is-nonconfigurable-property-in | ||
is-nonenumerable-property | ||
is-nonenumerable-property-in | ||
is-nonnegative-integer | ||
is-nonnegative-integer-array | ||
is-nonnegative-number | ||
is-nonnegative-number-array | ||
is-nonpositive-integer | ||
is-nonpositive-integer-array | ||
is-nonpositive-number | ||
is-nonpositive-number-array | ||
is-nonsymmetric-matrix | ||
is-null | ||
is-null-array | ||
is-number | ||
is-number-array | ||
is-numeric-array | ||
is-object | ||
is-object-array | ||
is-object-like | ||
is-odd | ||
is-persymmetric-matrix | ||
is-plain-object | ||
is-plain-object-array | ||
is-positive-integer | ||
is-positive-integer-array | ||
is-positive-number | ||
is-positive-number-array | ||
is-positive-zero | ||
is-prime | ||
is-primitive | ||
is-primitive-array | ||
is-prng-like | ||
is-probability | ||
is-probability-array | ||
is-prototype-of | ||
is-range-error | ||
is-read-only-property | ||
is-read-only-property-in | ||
is-read-write-property | ||
is-read-write-property-in | ||
is-readable-property | ||
is-readable-property-in | ||
is-reference-error | ||
is-regexp | ||
is-regexp-string | ||
is-relative-path | ||
is-safe-integer | ||
is-safe-integer-array | ||
is-same-value | ||
is-same-value-zero | ||
is-sharedarraybuffer | ||
is-skew-centrosymmetric-matrix | ||
is-skew-persymmetric-matrix | ||
is-skew-symmetric-matrix | ||
is-square-matrix | ||
is-square-number | ||
is-square-triangular-number | ||
is-strict-equal | ||
is-string | ||
is-string-array | ||
is-symbol | ||
is-symbol-array | ||
is-symmetric-matrix | ||
is-syntax-error | ||
is-touch-device | ||
is-triangular-number | ||
is-truthy | ||
is-truthy-array | ||
is-type-error | ||
is-typed-array | ||
is-typed-array-length | ||
is-typed-array-like | ||
is-uint8array | ||
is-uint8clampedarray | ||
is-uint16array | ||
is-uint32array | ||
is-unc-path | ||
is-undefined | ||
is-undefined-or-null | ||
is-unity-probability-array | ||
is-uppercase | ||
is-uri | ||
is-uri-error | ||
is-vector-like | ||
is-web-worker | ||
is-whitespace | ||
is-windows | ||
is-writable-property | ||
is-writable-property-in | ||
is-write-only-property | ||
is-write-only-property-in | ||
lib | ||
tools | ||
LICENSE | ||
NOTICE | ||
package.json | ||
README.md |
Assert
Standard library assertion utilities.
Installation
npm install @stdlib/assert
Usage
var assert = require( '@stdlib/assert' );
assert
Included in this namespace is a comprehensive suite of assertion utilities, such as utilities for testing for various data types and others for testing for JavaScript feature support.
var o = assert;
// returns {...}
To validate the built-in JavaScript data types, the namespace includes the following assertion utilities:
isArray( value )
: test if a value is an array.isBoolean( value )
: test if a value is a boolean.isDateObject( value )
: test if a value is a Date object.isFunction( value )
: test if a value is a function.isnan( value )
: test if a value is NaN.isNull( value )
: test if a value is null.isNumber( value )
: test if a value is a number.isObject( value )
: test if a value is an object.isRegExp( value )
: test if a value is a regular expression.isString( value )
: test if a value is a string.isSymbol( value )
: test if a value is a symbol.isUndefined( value )
: 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 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 )
: test if a value is an array of arrays.isBooleanArray( value )
: test if a value is an array-like object of booleans.isFunctionArray( value )
: test if a value is an array-like object containing only functions.isNaNArray( value )
: test if a value is an array-like object containing only NaN values.isNullArray( value )
: test if a value is an array-like object containing only null values.isNumberArray( value )
: test if a value is an array-like object of numbers.isObjectArray( value )
: test if a value is an array-like object containing only objects.isStringArray( value )
: test if a value is an array of strings.isSymbolArray( value )
: 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 )
: test if a value is a cube number.isIntegerArray( value )
: test if a value is an array-like object containing only integers.isInteger( value )
: test if a value is a number having an integer value.isNegativeIntegerArray( value )
: test if a value is an array-like object containing only negative integers.isNegativeInteger( value )
: test if a value is a number having a negative integer value.isNegativeNumberArray( value )
: test if a value is an array-like object containing only negative numbers.isNegativeNumber( value )
: test if a value is a number having a negative value.isNonNegativeIntegerArray( value )
: test if a value is an array-like object containing only nonnegative integers.isNonNegativeInteger( value )
: test if a value is a number having a nonnegative integer value.isNonNegativeNumberArray( value )
: test if a value is an array-like object containing only nonnegative numbers.isNonNegativeNumber( value )
: test if a value is a number having a nonnegative value.isNonPositiveIntegerArray( value )
: test if a value is an array-like object containing only nonpositive integers.isNonPositiveInteger( value )
: test if a value is a number having a nonpositive integer value.isNonPositiveNumberArray( value )
: test if a value is an array-like object containing only nonpositive numbers.isNonPositiveNumber( value )
: test if a value is a number having a nonpositive value.isPositiveIntegerArray( value )
: test if a value is an array-like object containing only positive integers.isPositiveInteger( value )
: test if a value is a number having a positive integer value.isPositiveNumberArray( value )
: test if a value is an array-like object containing only positive numbers.isPositiveNumber( value )
: test if a value is a number having a positive value.isSafeIntegerArray( value )
: test if a value is an array-like object containing only safe integers.isSafeInteger( value )
: test if a value is a number having a safe integer value.isSquareNumber( value )
: test if a value is a square number.isSquareTriangularNumber( value )
: test if a value is a square triangular number.isTriangularNumber( value )
: test if a value is a triangular number.
The namespace provides various utilities for validating typed arrays:
isFloat32Array( value )
: test if a value is a Float32Array.isFloat64Array( value )
: test if a value is a Float64Array.isInt16Array( value )
: test if a value is an Int16Array.isInt32Array( value )
: test if a value is an Int32Array.isInt8Array( value )
: test if a value is an Int8Array.isUint16Array( value )
: test if a value is a Uint16Array.isUint32Array( value )
: test if a value is a Uint32Array.isUint8Array( value )
: test if a value is a Uint8Array.isUint8ClampedArray( value )
: test if a value is a Uint8ClampedArray.
The namespace includes utilities for validating ndarray
s (n-dimensional arrays).
isCentrosymmetricMatrix( value )
: test if a value is a centrosymmetric matrix.isFloat32MatrixLike( value )
: test if a value is a 2-dimensional ndarray-like object containing single-precision floating-point numbers.isFloat32ndarrayLike( value )
: test if a value is an ndarray-like object containing single-precision floating-point numbers.isFloat32VectorLike( value )
: test if a value is a 1-dimensional ndarray-like object containing single-precision floating-point numbers.isFloat64MatrixLike( value )
: test if a value is a 2-dimensional ndarray-like object containing double-precision floating-point numbers.isFloat64ndarrayLike( value )
: test if a value is an ndarray-like object containing double-precision floating-point numbers.isFloat64VectorLike( value )
: test if a value is a 1-dimensional ndarray-like object containing double-precision floating-point numbers.isMatrixLike( value )
: test if a value is 2-dimensional ndarray-like object.isndarrayLike( value )
: test if a value is ndarray-like.isNonSymmetricMatrix( value )
: test if a value is a non-symmetric matrix.isPersymmetricMatrix( value )
: test if a value is a persymmetric matrix.isSkewCentrosymmetricMatrix( value )
: test if a value is a skew-centrosymmetric matrix.isSkewPersymmetricMatrix( value )
: test if a value is a skew-persymmetric matrix.isSkewSymmetricMatrix( value )
: test if a value is a skew-symmetric matrix.isSquareMatrix( value )
: test if a value is a 2-dimensional ndarray-like object having equal dimensions.isSymmetricMatrix( value )
: test if a value is a symmetric matrix.isVectorLike( value )
: 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 )
: test if a value is a complex number-like object.isComplexTypedArrayLike( value )
: test if a value is complex-typed-array-like.isComplexTypedArray( value )
: test if a value is a complex typed array.isComplex( value )
: test if a value is a 64-bit or 128-bit complex number.isComplex128( value )
: test if a value is a 128-bit complex number.isComplex128Array( value )
: test if a value is a Complex128Array.isComplex64( value )
: test if a value is a 64-bit complex number.isComplex64Array( value )
: test if a value is a Complex64Array.
The namespace includes utilities for validating other special arrays or buffers:
isArrayLength( value )
: test if a value is a valid array length.isArrayLikeObject( value )
: test if a value is an array-like object.isArrayLike( value )
: test if a value is array-like.isArrayBufferView( value )
: test if a value is an ArrayBuffer view.isArrayBuffer( value )
: test if a value is an ArrayBuffer.isBetweenArray( value, a, b[, left, right] )
: test if a value is an array-like object where every element is between two values.isBigInt64Array( value )
: test if a value is a BigInt64Array.isBigUint64Array( value )
: test if a value is a BigUint64Array.isCircularArray( value )
: test if a value is an array containing a circular reference.isEmptyArray( value )
: test if a value is an empty array.isFalsyArray( value )
: test if a value is an array-like object containing only falsy values.isFiniteArray( value )
: test if a value is an array-like object containing only finite numbers.isNumericArray( value )
: test if a value is a numeric array.isPlainObjectArray( value )
: test if a value is an array-like object containing only plain objects.isProbabilityArray( value )
: test if a value is an array-like object containing only probabilities.isSharedArrayBuffer( value )
: test if a value is a SharedArrayBuffer.isTruthyArray( value )
: test if a value is an array-like object containing only truthy values.isTypedArrayLength( value )
: test if a value is a valid typed array length.isTypedArrayLike( value )
: test if a value is typed-array-like.isTypedArray( value )
: test if a value is a typed array.isUnityProbabilityArray( value )
: 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 )
: test if a value is an Error object.isEvalError( value )
: test if a value is an EvalError object.isRangeError( value )
: test if a value is a RangeError object.isReferenceError( value )
: test if a value is a ReferenceError object.isSyntaxError( value )
: test if a value is a SyntaxError object.isTypeError( value )
: test if a value is a TypeError object.isURIError( value )
: test if a value is a URIError object.
The namespace exposes the following constants concerning the current running process:
IS_BIG_ENDIAN
: check if an environment is big endian.IS_BROWSER
: check if the runtime is a web browser.IS_DARWIN
: boolean indicating if the current process is running on Darwin.IS_DOCKER
: check if the process is running in a Docker container.IS_ELECTRON_MAIN
: check if the runtime is the main Electron process.IS_ELECTRON_RENDERER
: check if the runtime is the Electron renderer process.IS_ELECTRON
: check if the runtime is Electron.IS_LITTLE_ENDIAN
: check if an environment is little endian.IS_MOBILE
: check if the current environment is a mobile device.IS_NODE
: check if the runtime is Node.js.IS_TOUCH_DEVICE
: check if the current environment is a touch device.IS_WEB_WORKER
: check if the runtime is a web worker.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()
: detect nativeArrayBuffer
support.hasArrowFunctionSupport()
: detect nativearrow function
support.hasAsyncAwaitSupport()
: detect nativeasync
/await
support.hasAsyncIteratorSymbolSupport()
: detect nativeSymbol.asyncIterator
support.hasBigIntSupport()
: detect nativeBigInt
support.hasBigInt64ArraySupport()
: detect nativeBigInt64Array
support.hasBigUint64ArraySupport()
: detect nativeBigUint64Array
support.hasClassSupport()
: detect nativeclass
support.hasDataViewSupport()
: detect nativeDataView
support.hasDefinePropertiesSupport()
: detectObject.defineProperties
support.hasDefinePropertySupport()
: detectObject.defineProperty
support.hasFloat32ArraySupport()
: detect nativeFloat32Array
support.hasFloat64ArraySupport()
: detect nativeFloat64Array
support.hasFunctionNameSupport()
: detect native functionname
support.hasGeneratorSupport()
: detect nativegenerator function
support.hasGlobalThisSupport()
: detectglobalThis
support.hasInt16ArraySupport()
: detect nativeInt16Array
support.hasInt32ArraySupport()
: detect nativeInt32Array
support.hasInt8ArraySupport()
: detect nativeInt8Array
support.hasIteratorSymbolSupport()
: detect nativeSymbol.iterator
support.hasMapSupport()
: detect nativeMap
support.hasNodeBufferSupport()
: detect nativeBuffer
support.hasProxySupport()
: detect nativeProxy
support.hasSetSupport()
: detect nativeSet
support.hasSharedArrayBufferSupport()
: detect nativeSharedArrayBuffer
support.hasSymbolSupport()
: detect nativeSymbol
support.hasToStringTagSupport()
: detect nativeSymbol.toStringTag
support.hasUint16ArraySupport()
: detect nativeUint16Array
support.hasUint32ArraySupport()
: detect nativeUint32Array
support.hasUint8ArraySupport()
: detect nativeUint8Array
support.hasUint8ClampedArraySupport()
: detect nativeUint8ClampedArray
support.hasWebAssemblySupport()
: detect native WebAssembly support.hasWeakMapSupport()
: detect nativeWeakMap
support.hasWeakSetSupport()
: detect nativeWeakSet
support.
The remaining namespace utilities are as follows:
contains( val, searchValue[, position] )
: test if an array-like value contains a search value.deepEqual( a, b )
: test for deep equality between two values.deepHasOwnProp( value, path[, options] )
: test whether an object contains a nested key path.deepHasProp( value, path[, options] )
: test whether an object contains a nested key path, either own or inherited.hasOwnProp( value, property )
: test if an object has a specified property.hasProp( value, property )
: test if an object has a specified property, either own or inherited.hasUTF16SurrogatePairAt( string, position )
: test if a position in a string marks the start of a UTF-16 surrogate pair.instanceOf( value, constructor )
: test whether a value has in its prototype chain a specified constructor as a prototype property.isAbsolutePath( value )
: test if a value is an absolute path.isAccessorPropertyIn( value, property )
: test if an object's own or inherited property has an accessor descriptor.isAccessorProperty( value, property )
: test if an object's own property has an accessor descriptor.isAlphagram( value )
: test if a value is an alphagram.isAlphaNumeric( value )
: test whether a string contains only alphanumeric characters.isAnagram( str, value )
: test if a value is an anagram.isArguments( value )
: test if a value is an arguments object.isArrowFunction( value )
: test if a value is anarrow function
.isASCII( value )
: 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] )
: test if a value is between two values.isBigInt( value )
: test if a value is a BigInt.isBinaryString( value )
: test if a value is a binary string.isBoxedPrimitive( value )
: test if a value is a JavaScript boxed primitive.isBuffer( value )
: test if a value is a Buffer object.isCapitalized( value )
: test if a value is a string having an uppercase first character.isCircular( value )
: test if a value is a plain object containing a circular reference.isCircular( value )
: test if an object-like value contains a circular reference.isClass( value )
: test if a value is a class.isCollection( value )
: test if a value is a collection.isComposite( value )
: test if a value is a composite number.isConfigurablePropertyIn( value, property )
: test if an object's own or inherited property is configurable.isConfigurableProperty( value, property )
: test if an object's own property is configurable.isDataPropertyIn( value, property )
: test if an object's own or inherited property has a data descriptor.isDataProperty( value, property )
: test if an object's own property has a data descriptor.isDataView( value )
: test if a value is a DataView.isDigitString( value )
: test whether a string contains only numeric digits.isEmailAddress( value )
: test if a value is an email address.isEmptyObject( value )
: test if a value is an empty object.isEmptyString( value )
: test if a value is an empty string.isEnumerablePropertyIn( value, property )
: test if an object's own or inherited property is enumerable.isEnumerableProperty( value, property )
: test if an object's own property is enumerable.isEven( value )
: test if a value is an even number.isFalsy( value )
: test if a value is falsy.isFinite( value )
: test if a value is a finite number.isGeneratorObjectLike( value )
: test if a value isgenerator
object-like.isGeneratorObject( value )
: test if a value is agenerator
object.isgzipBuffer( value )
: test if a value is a gzip buffer.isHexString( value )
: test whether a string contains only hexadecimal digits.isInfinite( value )
: test if a value is an infinite number.isInheritedProperty( value, property )
: test if an object has an inherited property.isIterableLike( value )
: test if a value isiterable
-like.isIteratorLike( value )
: test if a value isiterator
-like.isJSON( value )
: test if a value is a parseable JSON string.isLeapYear( [value] )
: test if a value corresponds to a leap year in the Gregorian calendar.isLowercase( value )
: test if a value is a lowercase string.isMethodIn( value, property )
: test if an object has a specified method name, either own or inherited.isMethod( value, property )
: test if an object has a specified method name.isNamedTypedTupleLike( value )
: test if a value is named typed tuple-like.isNativeFunction( value )
: test if a value is a native function.isNegativeZero( value )
: test if a value is a number equal to negative zero.isNodeBuiltin( value )
: test whether a string matches a Node.js built-in module name.isNodeDuplexStreamLike( value )
: test if a value is Node duplex stream-like.isNodeReadableStreamLike( value )
: test if a value is Node readable stream-like.isNodeREPL()
: check if running in a Node.js REPL environment.isNodeStreamLike( value )
: test if a value is Node stream-like.isNodeTransformStreamLike( value )
: test if a value is Node transform stream-like.isNodeWritableStreamLike( value )
: test if a value is Node writable stream-like.isNonConfigurablePropertyIn( value, property )
: test if an object's own or inherited property is non-configurable.isNonConfigurableProperty( value, property )
: test if an object's own property is non-configurable.isNonEnumerablePropertyIn( value, property )
: test if an object's own or inherited property is non-enumerable.isNonEnumerableProperty( value, property )
: test if an object's own property is non-enumerable.isObjectLike( value )
: test if a value is object-like.isOdd( value )
: test if a value is an odd number.isPlainObject( value )
: test if a value is a plain object.isPositiveZero( value )
: test if a value is a number equal to positive zero.isPrime( value )
: test if a value is a prime number.isPrimitive( value )
: test if a value is a JavaScript primitive.isPRNGLike( value )
: test if a value is PRNG-like.isProbability( value )
: test if a value is a probability.isPrototypeOf( obj, prototype )
: test if an object's prototype chain contains a provided prototype.isReadOnlyPropertyIn( value, property )
: test if an object's own or inherited property is read-only.isReadOnlyProperty( value, property )
: test if an object's own property is read-only.isReadWritePropertyIn( value, property )
: test if an object's own or inherited property is readable and writable.isReadWriteProperty( value, property )
: test if an object's own property is readable and writable.isReadablePropertyIn( value, property )
: test if an object's own or inherited property is readable.isReadableProperty( value, property )
: test if an object's own property is readable.isRegExpString( value )
: test if a value is a regular expression string.isRelativePath( value )
: test if a value is a relative path.isSameValueZero( a, b )
: test if two arguments are the same value.isSameValue( a, b )
: test if two arguments are the same value.isStrictEqual( a, b )
: test if two arguments are strictly equal.isTruthy( value )
: test if a value is truthy.isUNCPath( value )
: test if a value is a UNC path.isUndefinedOrNull( value )
: test if a value is undefined or null.isUppercase( value )
: test if a value is an uppercase string.isURI( value )
: test if a value is a URI.isWhitespace( value )
: test whether a string contains only white space characters.isWritablePropertyIn( value, property )
: test if an object's own or inherited property is writable.isWritableProperty( value, property )
: test if an object's own property is writable.isWriteOnlyPropertyIn( value, property )
: test if an object's own or inherited property is write-only.isWriteOnlyProperty( value, property )
: test if an object's own property is write-only.
Examples
var objectKeys = require( '@stdlib/utils/keys' );
var assert = require( '@stdlib/assert' );
console.log( objectKeys( assert ) );
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2021. The Stdlib Authors.