Update readme.md

This commit is contained in:
Sindre Sorhus 2022-01-17 12:42:34 +07:00 committed by GitHub
parent 81a9db9111
commit 1746235db5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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