Skip to content

Commit 6a7f079

Browse files
refactor(isKey): check primitive only
1 parent 2338fce commit 6a7f079

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/type/src/is/lib/is-key.func.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Function.
2-
import { isNumber } from './is-number.func';
3-
import { isString } from './is-string.func';
2+
import { isNumberType } from './is-number-type.func';
3+
import { isStringType } from './is-string-type.func';
44
import { isSymbol } from './is-symbol.func';
55
import { resultCallback } from '../../lib/result-callback.func';
66
// Type.
@@ -15,4 +15,4 @@ import { ResultCallback } from '../../type/result-callback.type';
1515
* @returns A `boolean` indicating whether or not the `value` is a `Key`.
1616
*/
1717
export const isKey: IsKey = (value: any, callback: ResultCallback = resultCallback): value is Key =>
18-
callback(isString(value) || isNumber(value) || isSymbol(value), value);
18+
callback(isStringType(value) || isNumberType(value) || isSymbol(value), value);

0 commit comments

Comments
 (0)