mirror of
https://github.com/josdejong/mathjs.git
synced 2026-02-01 16:07:46 +00:00
Update latest docs for hasNumericValue and update package-lock.json
This commit is contained in:
parent
892f8670ef
commit
c0486162dd
@ -4,6 +4,8 @@
|
||||
|
||||
Test whether a value is an numeric value.
|
||||
|
||||
In case of a string, true is returned if the string contains a numeric value.
|
||||
|
||||
|
||||
## Syntax
|
||||
|
||||
@ -28,11 +30,12 @@ boolean | Returns true when `x` is a `number`, `BigNumber`, `Fraction`, `Boolean
|
||||
|
||||
```js
|
||||
math.hasNumericValue(2) // returns true
|
||||
math.hasNumericValue('2') // returns true
|
||||
math.isNumeric('2') // returns false
|
||||
math.hasNumericValue(0) // returns true
|
||||
math.hasNumericValue(math.bignumber(500)) // returns true
|
||||
math.hasNumericValue(math.fraction(4)) // returns true
|
||||
math.hasNumericValue(math.complex('2-4i') // returns false
|
||||
math.hasNumericValue('3') // returns true
|
||||
math.hasNumericValue([2.3, 'foo', false]) // returns [true, false, true]
|
||||
```
|
||||
|
||||
@ -42,4 +45,5 @@ math.hasNumericValue([2.3, 'foo', false]) // returns [true, false, true]
|
||||
[isZero](isZero.md),
|
||||
[isPositive](isPositive.md),
|
||||
[isNegative](isNegative.md),
|
||||
[isInteger](isInteger.md)
|
||||
[isInteger](isInteger.md),
|
||||
[isNumeric](isNumeric.md)
|
||||
|
||||
@ -30,11 +30,12 @@ boolean | Returns true when `x` is a `number`, `BigNumber`, `Fraction`, or `bool
|
||||
|
||||
```js
|
||||
math.isNumeric(2) // returns true
|
||||
math.isNumeric('2') // returns true
|
||||
math.hasNumericValue('2') // returns true
|
||||
math.isNumeric(0) // returns true
|
||||
math.isNumeric(math.bignumber(500)) // returns true
|
||||
math.isNumeric(math.fraction(4)) // returns true
|
||||
math.isNumeric(math.complex('2-4i') // returns false
|
||||
math.isNumeric('3') // returns false
|
||||
math.isNumeric([2.3, 'foo', false]) // returns [true, false, true]
|
||||
```
|
||||
|
||||
@ -44,4 +45,5 @@ math.isNumeric([2.3, 'foo', false]) // returns [true, false, true]
|
||||
[isZero](isZero.md),
|
||||
[isPositive](isPositive.md),
|
||||
[isNegative](isNegative.md),
|
||||
[isInteger](isInteger.md)
|
||||
[isInteger](isInteger.md),
|
||||
[hasNumericValue](hasNumericValue.md)
|
||||
|
||||
4440
package-lock.json
generated
4440
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,7 @@ import { isZeroDocs } from './function/utils/isZero'
|
||||
import { isPrimeDocs } from './function/utils/isPrime'
|
||||
import { isPositiveDocs } from './function/utils/isPositive'
|
||||
import { isNumericDocs } from './function/utils/isNumeric'
|
||||
import { hasNumericValueDocs } from './function/utils/hasNumericValue'
|
||||
import { isNegativeDocs } from './function/utils/isNegative'
|
||||
import { isIntegerDocs } from './function/utils/isInteger'
|
||||
import { isNaNDocs } from './function/utils/isNaN'
|
||||
@ -508,6 +509,7 @@ export const embeddedDocs = {
|
||||
isInteger: isIntegerDocs,
|
||||
isNegative: isNegativeDocs,
|
||||
isNumeric: isNumericDocs,
|
||||
hasNumericValue: hasNumericValueDocs,
|
||||
isPositive: isPositiveDocs,
|
||||
isPrime: isPrimeDocs,
|
||||
isZero: isZeroDocs,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
export const hasNumericValueDocs = {
|
||||
'name': 'hasNumericValue',
|
||||
'category': 'Utils',
|
||||
'syntax': [
|
||||
|
||||
@ -903,6 +903,7 @@ const math = /* #__PURE__ */ {
|
||||
isNaN,
|
||||
isNegative,
|
||||
isNumeric,
|
||||
hasNumericValue,
|
||||
isPositive,
|
||||
isPrime,
|
||||
isZero,
|
||||
|
||||
@ -693,7 +693,8 @@ exports.expectedInstanceStructure = {
|
||||
mean: 'Function',
|
||||
min: 'Function',
|
||||
range: 'Function',
|
||||
subset: 'Function'
|
||||
subset: 'Function',
|
||||
sum: 'Function'
|
||||
},
|
||||
mathWithTransform: {
|
||||
// note that we don't have classes here,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user