Last active
August 29, 2015 14:08
-
-
Save stereokai/82ea6fe3959a7d0879af to your computer and use it in GitHub Desktop.
Javascript: dynamic name function with eval()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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