Skip to content

Commit 8152f47

Browse files
committed
feat: add isObject method to Sanitizer for object type checking
1 parent e2eaf5f commit 8152f47

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/modules/sanitizer.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
* - represent class as <class SomeClass> or <instance of SomeClass>
88
*/
99
export default class Sanitizer {
10+
/**
11+
* Check if passed variable is an object
12+
*
13+
* @param target - variable to check
14+
*/
15+
public static isObject(target: any): boolean {
16+
return Sanitizer.typeOf(target) === 'object';
17+
}
18+
1019
/**
1120
* Maximum string length
1221
*/
@@ -148,15 +157,6 @@ export default class Sanitizer {
148157
return result;
149158
}
150159

151-
/**
152-
* Check if passed variable is an object
153-
*
154-
* @param target - variable to check
155-
*/
156-
public static isObject(target: any): boolean {
157-
return Sanitizer.typeOf(target) === 'object';
158-
}
159-
160160
/**
161161
* Check if passed variable is an array
162162
*

0 commit comments

Comments
 (0)