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)
|
##### .dataView(value)
|
||||||
|
|
||||||
##### .enumCase(value, enum)
|
##### .enumCase(value, enum)
|
||||||
|
|
||||||
**TypeScript-only**
|
**TypeScript-only**
|
||||||
|
|
||||||
Returns `true` if `value` is a member of `enum`.
|
Returns `true` if `value` is a member of `enum`.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
|
@ -222,10 +224,10 @@ enum Direction {
|
||||||
Descending = 'descending'
|
Descending = 'descending'
|
||||||
}
|
}
|
||||||
|
|
||||||
is.enumCase('asc', EnumDirection);
|
is.enumCase('ascending', Direction);
|
||||||
//=> true
|
//=> true
|
||||||
|
|
||||||
is.enumCase('other', EnumDirection);
|
is.enumCase('other', Direction);
|
||||||
//=> false
|
//=> false
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue