mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 05:01:42 +03:00
14 lines
266 B
JavaScript
14 lines
266 B
JavaScript
|
(function foo(obj) {
|
||
|
if (obj) {
|
||
|
for (const key in obj) {
|
||
|
const element = obj[key];
|
||
|
|
||
|
if (element && foo(element.children)) {
|
||
|
// do something
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
})()
|