Saturday, April 27, 2013

Overriding Javascript's array.sort function

To get a case-insensitive sort of values in an array, override the sort function as shown here: Test from the console with the following command:
[node] curl -X GET -i localhost:8080
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 41
Date: Sun, 28 Apr 2013 00:13:46 GMT
Connection: keep-alive

Anand asad ernie greg Holly natalie Tim 
[node]