Skip to content

Instantly share code, notes, and snippets.

@stereokai
Last active August 29, 2015 14:08
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 stereokai/82ea6fe3959a7d0879af to your computer and use it in GitHub Desktop.
Save stereokai/82ea6fe3959a7d0879af to your computer and use it in GitHub Desktop.
Javascript: dynamic name function with eval()
looper = eval('(function () { return \
function ' + (request.name ? request.name + 'Looper' : 'looper') + ' (timestamp, startTime) { \
if (_locks.global || _locks[request.namespace] || _locks[request._fid]) return; \
\
request(timestamp, startTime); \
} \
})()');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment