Skip to content

Commit e62ea8d

Browse files
committed
feat: add isNodeList func
1 parent 9d4d2b9 commit e62ea8d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/type.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,4 +201,11 @@ export function isEmpty(value: any): boolean {
201201
return !Object.keys(value).length;
202202
}
203203

204+
/**
205+
* Checks if `value` is an NodeList object
206+
*/
207+
export function isNodeList(value: any) {
208+
return NodeList.prototype.isPrototypeOf(value);
209+
}
210+
204211
export default typeIs;

0 commit comments

Comments
 (0)