StevenLangbroek / jortsort

the official website for jortSorting

Home Page:http://jort.technology

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jortSort

sorting is over as we know it. more info soon.

(function (root, factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define([], factory);
    } else {
        // Browser globals
        root.jortSort = factory(root);
    }
}(this, function () {
    return function( array ) {

      // sort the array
      var originalArray = array.slice(0);
      array.sort( function(a,b){return a - b} );
    
      // compare to see if it was originally sorted
      for (var i = 0; i < originalArray.length; ++i) {
        if (originalArray[i] !== array[i]) return false;
      }
    
      return true;
    };
}));

literally made with blood and tears

About

the official website for jortSorting

http://jort.technology

License:MIT License


Languages

Language:CSS 52.7%Language:JavaScript 47.3%