Skip to content

Instantly share code, notes, and snippets.

@shimondoodkin
Created May 31, 2016 14:06
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 shimondoodkin/72bd9b493c22feb7fc627d907a27ac07 to your computer and use it in GitHub Desktop.
Save shimondoodkin/72bd9b493c22feb7fc627d907a27ac07 to your computer and use it in GitHub Desktop.
function s(m,n){ var x=n&&m.children.filter(function(e){return e.filename.indexOf(n)!=-1})||[]; if(x.length) return x[0]; else console.log(n+' not found',m.children.map(function(e){return e.filename})); }
s(require.main)
to print a list
var xapp=s(require.main,'app')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment