-
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
6093fad
commit ef8e21d
Showing
13 changed files
with
2,741 additions
and
431 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,2 +1,5 @@ | ||
node_modules/ | ||
dist/ | ||
dist/ | ||
.rts2_cache_cjs | ||
.rts2_cache_esm | ||
.rts2_cache_umd |
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
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
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,19 @@ | ||
export { default as isArray } from './isArray'; | ||
export { default as isDefined } from './isDefined'; | ||
export { default as isFilledString } from './isFilledString'; | ||
export { default as isFunction } from './isFunction'; | ||
export { default as isNil } from './isNil'; | ||
export { default as isNumber } from './isNumber'; | ||
export { default as isString } from './isString'; | ||
export const isDefined = <T>(value: T | undefined): value is T => | ||
typeof value !== 'undefined'; | ||
|
||
export const isNil = (value: any): value is undefined | null => | ||
typeof value === 'undefined' || value === null; | ||
|
||
export const isNumber = (value: any): value is number => typeof value === 'number'; | ||
|
||
export const isString = (value: any): value is string => typeof value === 'string'; | ||
|
||
/** | ||
* the value is a string and is not an empty string ('') | ||
*/ | ||
export const isFilledString = (value: any): value is string => | ||
typeof value === 'string' && value.length > 0; | ||
|
||
export const isArray = <T>(value: any): value is Array<T> => Array.isArray(value); | ||
|
||
export const isFunction = (value: any): value is Function => typeof value === 'function'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.