-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
baf2b71
commit d33d0df
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,39 @@ | ||
/** | ||
* @description is the value string or not | ||
* @returns boolean | ||
* @param string your value | ||
* @example isString('mmd') | ||
*/ | ||
export const isString = (value: any) => typeof value === "string"; | ||
|
||
/** | ||
* @description is the value number or not | ||
* @returns boolean | ||
* @param any your value | ||
* @example isNumber(2) | ||
*/ | ||
export const isNumber = (value: any) => typeof value === "number"; | ||
|
||
/** | ||
* @description is the value undefined or not | ||
* @returns boolean | ||
* @param any your value | ||
* @example isUndefined('mmd') | ||
*/ | ||
export const isUndefined = (value: any) => typeof value === "undefined"; | ||
|
||
/** | ||
* @description is the value object or not | ||
* @returns boolean | ||
* @param object your value | ||
* @example isObject({name:'mmd'}) | ||
*/ | ||
export const isObject = (value: any) => typeof value === "object"; | ||
|
||
/** | ||
* @description is the value symbol or not | ||
* @returns boolean | ||
* @param symbol your value | ||
* @example isSymbol({name:'mmd'}) | ||
*/ | ||
export const isSymbol = (value: any) => typeof value === "symbol"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters