Skip to content

Commit

Permalink
Merge pull request #52 from impressi-web/master
Browse files Browse the repository at this point in the history
Make whilst exercise solution compatible with latest version of async
  • Loading branch information
bulkan authored Jan 10, 2021
2 parents b04368d + 18a35e4 commit 4ecaa05
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions exercises/whilst/solution/solution.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
var http = require('http')
"use strict"
const http = require('http')
, async = require('async');

var requestBody = '';
let requestBody = '';

var count = 0;
let count = 0;

async.whilst(
function() {
return !/meerkat/.test(requestBody.trim());
},
function(cb) {
cb(null,!/meerkat/.test(requestBody.trim()));
},//async v3.x.x

function(done){
var body = '';
let body = '';
http.get(process.argv[2], function(res){
res.on('data', function(chunk){
body += chunk.toString();
Expand Down

0 comments on commit 4ecaa05

Please sign in to comment.