mirror of
https://github.com/liriliri/eruda.git
synced 2026-03-20 09:38:37 +08:00
Dev: Basic string substitution support
This commit is contained in:
@@ -846,6 +846,19 @@ Check if keys and values in src are contained in obj.
|
||||
isMatch({a: 1, b: 2}, {a: 1}); // -> true
|
||||
```
|
||||
|
||||
## isNull
|
||||
|
||||
Check if value is an Null.
|
||||
|
||||
|Name |Type |Desc |
|
||||
|------|-------|-----------------------|
|
||||
|value |* |Value to check |
|
||||
|return|boolean|True if value is an Null|
|
||||
|
||||
```javascript
|
||||
isNull(null); // -> true
|
||||
```
|
||||
|
||||
## isNum
|
||||
|
||||
Checks if value is classified as a Number primitive or object.
|
||||
@@ -1222,6 +1235,19 @@ toArr(1); // -> []
|
||||
toArr(null); // -> []
|
||||
```
|
||||
|
||||
## toInt
|
||||
|
||||
Convert value to an integer.
|
||||
|
||||
|Name |Type |Desc |
|
||||
|------|------|-----------------|
|
||||
|val |* |Value to convert |
|
||||
|return|number|Converted integer|
|
||||
|
||||
```javascript
|
||||
toInt(1.1); // -> 1
|
||||
```
|
||||
|
||||
## toNum
|
||||
|
||||
Convert value to a number.
|
||||
|
||||
Reference in New Issue
Block a user