Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unleashes zalgo #10

Open
ForbesLindesay opened this issue Apr 17, 2014 · 1 comment
Open

Unleashes zalgo #10

ForbesLindesay opened this issue Apr 17, 2014 · 1 comment

Comments

@ForbesLindesay
Copy link

Because it doesn't call setImmediate before calling the callback function it is possible to unleash zalgo. e.g.

var delay = thunkify(function (time, callback) {
  setTimeout(callback, time);
});

var result = delay(100);
setTimeout(function () {
  console.log('a');
  result(function () {
    console.log('c');
  });
  console.log('b');
}, 500);

Expected:

a
b
c

Actual:

a
c
b
@tj
Copy link
Owner

tj commented Apr 17, 2014

I'm down with a setImmediate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants