Update index.ts
This commit is contained in:
parent
07ba63da4f
commit
1a9fdacd2d
1 changed files with 4 additions and 1 deletions
|
|
@ -359,7 +359,10 @@ is.nonEmptySet = <T = unknown>(value: unknown): value is Set<T> => is.set(value)
|
|||
|
||||
is.emptyMap = (value: unknown): value is Map<never, never> => is.map(value) && value.size === 0;
|
||||
is.nonEmptyMap = <Key = unknown, Value = unknown>(value: unknown): value is Map<Key, Value> => is.map(value) && value.size > 0;
|
||||
/** Returns `true` if `value` can be used as an object property key (either a `string`, a `number` or a `symbol`.) */
|
||||
|
||||
/**
|
||||
Returns `true` if `value` can be used as an object property key (either a `string`, a `number` or a `symbol`).
|
||||
*/
|
||||
is.propertyKey = (value: unknown): value is PropertyKey => is.any([is.string, is.number, is.symbol], value);
|
||||
|
||||
export type Predicate = (value: unknown) => boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue