In https://github.com/yeahoffline/redis-mock/blob/master/test/client/redis-mock.keys.test.js:
beforeEach(function (done) { r.set("hello", "test", function () { r.set("hallo", "test", function () { r.set("hxlo", "test", done); }); }); });
What is the way to convert this to ES6 fat arrow syntax? I tried looking for an online converter but failed to find one.
beforeEach((done) => { r.set("hello", "test", () => { r.set("hallo", "test", () => { r.set("hxlo", "test", done); }); }); });
If it was a standalone function you would write
const setHellos = (done) => { .... }
1.4m articles
1.4m replys
5 comments
57.0k users