faire_un_dump_dans_la_console
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
faire_un_dump_dans_la_console [2022/11/10 21:01] – tickleman | faire_un_dump_dans_la_console [2022/11/25 13:05] (Version actuelle) – tickleman | ||
---|---|---|---|
Ligne 6: | Ligne 6: | ||
<code javascript> | <code javascript> | ||
- | dmp = (what, pre = '', | + | dmp = (what, pre = '', |
+ | if (depth === 100) anticyclic = {} | ||
if (typeof what == ' | if (typeof what == ' | ||
if (typeof what == ' | if (typeof what == ' | ||
- | for (const anti in anticyclic) if (anticyclic.hasOwnProperty(anti)) if (anticyclic[anti] === what) return ' | + | for (const anti in anticyclic) if (anticyclic.hasOwnProperty(anti) |
if (!depth) return what.toString() | if (!depth) return what.toString() | ||
if (Array.isArray(what)) { | if (Array.isArray(what)) { | ||
Ligne 31: | Ligne 32: | ||
return what.toString() | return what.toString() | ||
} | } | ||
- | anticyclic = {} | ||
dmp(application) | dmp(application) | ||
</ | </ |
faire_un_dump_dans_la_console.1668110519.txt.gz · Dernière modification : 2022/11/10 21:01 de tickleman