Dev: Basic string substitution support

This commit is contained in:
surunzi
2016-08-23 22:40:56 +08:00
parent 7d47d007a4
commit eedcc67c62
10 changed files with 244 additions and 78 deletions

View File

@@ -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.