We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6eded2 commit fbcd405Copy full SHA for fbcd405
src/utils/helpers.ts
@@ -13,7 +13,10 @@ export const toTitleCase = (str: string) => str.charAt(0).toUpperCase() + str.sl
13
14
export const noop = (): any => { /* noop*/ };
15
16
-export const isComplexType = (o: any) => ['object', 'function'].includes(typeof o);
+export const isComplexType = (o: any) => {
17
+ o = (typeof o)[0];
18
+ return o === 'o' || o === 'f';
19
+};
20
21
export const sortBy = <T>(array: T[], prop: ((item: T) => string | number)) => {
22
return array.slice().sort((a, b) => {
0 commit comments