Skip to content

Instantly share code, notes, and snippets.

@robintindale
Created June 18, 2019 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robintindale/adb5d49fce34895a123f2b6f088e35de to your computer and use it in GitHub Desktop.
Save robintindale/adb5d49fce34895a123f2b6f088e35de to your computer and use it in GitHub Desktop.
XD recursive plugin crash
function getValue(thing){
var json = {};
for(var key in thing){
json[key] = getValue(thing[key]);
}
return json;
}
function loopCrash() {
var x = {test: 'hacks'};
var parent = {children: x};
x.parent = parent;
return getValue(parent);
}
module.exports = {
commands: {
crash: loopCrash
}
};
{
"name": "crash",
"id": "18292717723",
"version": "1.0.0",
"description": "recursive crash",
"host": {
"app": "XD",
"minVersion": "18.0"
},
"uiEntryPoints": [
{
"type": "menu",
"label": "Loop crash",
"commandId": "crash"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment