1.0.5 • Published 7 years ago

merge-sort-array v1.0.5

Weekly downloads
5
License
ISC
Repository
github
Last release
7 years ago

This is module which can sort an array using merge sort algorithm.

Install.

You can install it from npm repository using next comand:

npm install merge-sort-array --save

This is example how to use this module.

http.createServer(function(request, response) {
    var data = '';

    request.on('data', function(chunk) {
        data += chunk.toString();
    });

    request.on('end', function() {
        var unsortArray = JSON.parse(data);

        if (unsortArray.length) {
            response.writeHead(200, {"Content-Type": "text/plain"});
            response.write(JSON.stringify(mergeSort(unsortArray)));
            response.end();
        }
    });

}).listen(3000);
1.0.5

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago