About stdlib...
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Base math assertion utilities.
import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/math-base-assert@esm/index.mjs';
You can also import the following named exports from the package:
import { isComposite, isCoprime, isEven, isEvenInt32, isFinite, isFinitef, isInfinite, isInfinitef, isInteger, isNegativeFinite, isNegativeInteger, isNegativeZero, isNegativeZerof, isNonNegativeFinite, isNonNegativeInteger, isNonPositiveFinite, isNonPositiveInteger, isOdd, isOddInt32, isPositiveFinite, isPositiveInteger, isPositiveZero, isPositiveZerof, isPow2Uint32, isPrime, isProbability, isSafeInteger, isnan, isnanf } from 'https://cdn.jsdelivr.net/gh/stdlib-js/math-base-assert@esm/index.mjs';
Namespace containing "base" (i.e., lower-level) math assertion utilities.
var o = ns;
// returns {...}
isEvenInt32( x )
: test if a 32-bit integer is even.isOddInt32( x )
: test if a 32-bit integer is odd.isComposite( x )
: test if a number is a composite.isCoprime( a, b )
: test if two numbers are coprime.isEven( x )
: test if a finite numeric value is an even number.isFinite( x )
: test if a double-precision floating-point numeric value is finite.isFinitef( x )
: test if a single-precision floating-point numeric value is finite.isInfinite( x )
: test if a double-precision floating-point numeric value is infinite.isInfinitef( x )
: test if a single-precision floating-point numeric value is infinite.isInteger( x )
: test if a finite double-precision floating-point number is an integer.isnan( x )
: test if a double-precision floating-point numeric value is NaN.isnanf( x )
: test if a single-precision floating-point numeric value is NaN.isNegativeFinite( x )
: test if a double-precision floating-point numeric value is a negative finite number.isNegativeInteger( x )
: test if a finite double-precision floating-point number is a negative integer.isNegativeZero( x )
: test if a double-precision floating-point numeric value is negative zero.isNegativeZerof( x )
: test if a single-precision floating-point numeric value is negative zero.isNonNegativeFinite( x )
: test if a numeric value is a nonnegative finite number.isNonNegativeInteger( x )
: test if a finite double-precision floating-point number is a nonnegative integer.isNonPositiveFinite( x )
: test if a numeric value is a nonpositive finite number.isNonPositiveInteger( x )
: test if a finite double-precision floating-point number is a nonpositive integer.isOdd( x )
: test if a finite double-precision floating-point number is an odd number.isPositiveFinite( x )
: test if a double-precision floating-point numeric value is a positive finite number.isPositiveInteger( x )
: test if a finite double-precision floating-point number is a positive integer.isPositiveZero( x )
: test if a double-precision floating-point numeric value is positive zero.isPositiveZerof( x )
: test if a single-precision floating-point numeric value is positive zero.isPrime( x )
: test if a number is a prime.isProbability( x )
: test if a double-precision floating-point number is a probability.isSafeInteger( x )
: test if a finite double-precision floating-point number is a safe integer.isPow2Uint32( x )
: test whether an unsigned integer is a power of 2.
<!DOCTYPE html>
<html lang="en">
<body>
<script type="module">
import objectKeys from 'https://cdn.jsdelivr.net/gh/stdlib-js/utils-keys@esm/index.mjs';
import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/math-base-assert@esm/index.mjs';
console.log( objectKeys( ns ) );
</script>
</body>
</html>
This package is part of stdlib, a standard library 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.
See LICENSE.
Copyright © 2016-2024. The Stdlib Authors.