Skip to content

Instantly share code, notes, and snippets.

@stropitek
Created February 27, 2017 13:40
Show Gist options
  • Save stropitek/a171cafda73379e7ea5be86c8a4e741a to your computer and use it in GitHub Desktop.
Save stropitek/a171cafda73379e7ea5be86c8a4e741a to your computer and use it in GitHub Desktop.
'use strict';
const data = [1487868586378,1487857485296,"2016-06-10T11:15:13.000Z","2008-05-16T11:57:27.000Z","2008-05-16T11:57:27.000Z","2008-05-16T11:57:27.000Z","2008-05-16T11:57:32.000Z","2008-05-16T11:57:31.000Z","2008-05-16T11:57:31.000Z","2008-05-16T11:57:31.000Z","2008-05-16T11:57:31.000Z","2008-05-16T11:57:31.000Z","2008-05-16T11:57:31.000Z","2008-05-16T11:57:31.000Z","2008-05-16T11:57:31.000Z","2008-05-16T11:57:31.000Z","2008-05-16T11:57:27.000Z","2008-05-16T11:57:27.000Z","2008-05-16T11:57:27.000Z","2008-05-16T11:57:27.000Z","2008-05-16T11:57:27.000Z","2008-05-16T11:57:13.000Z","2008-05-16T11:57:13.000Z","2008-05-16T11:57:13.000Z","2008-05-16T11:57:12.000Z","2008-05-16T11:57:12.000Z",1485944753582,1485871296146,1485871143711,1484125236275,1484069406406,"2008-05-16T11:57:41.000Z"];
const timsort = require('.');
timsort.sort(data, function (a, b) {
if (a < b) return -1;
else if (a > b) return 1;
return 0
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment