Update readme.md
This commit is contained in:
parent
81a9db9111
commit
1746235db5
1 changed files with 4 additions and 2 deletions
|
|
@ -213,7 +213,9 @@ is.boundFunction(function () {});
|
|||
##### .dataView(value)
|
||||
|
||||
##### .enumCase(value, enum)
|
||||
|
||||
**TypeScript-only**
|
||||
|
||||
Returns `true` if `value` is a member of `enum`.
|
||||
|
||||
```ts
|
||||
|
|
@ -222,10 +224,10 @@ enum Direction {
|
|||
Descending = 'descending'
|
||||
}
|
||||
|
||||
is.enumCase('asc', EnumDirection);
|
||||
is.enumCase('ascending', Direction);
|
||||
//=> true
|
||||
|
||||
is.enumCase('other', EnumDirection);
|
||||
is.enumCase('other', Direction);
|
||||
//=> false
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue