Skip to content

Instantly share code, notes, and snippets.

@frantorreg
frantorreg / keybase.md
Created October 29, 2017 11:42
Keybase proof

Keybase proof

I hereby claim:

  • I am frantorreg on github.
  • I am franta (https://keybase.io/franta) on keybase.
  • I have a public key whose fingerprint is 7D32 13EB 62CE AB22 AE7E 7792 C687 F325 E96B A377

To claim this, I am signing this object:

@frantorreg
frantorreg / array-disorder.js
Last active April 25, 2017 00:08
Disorder a JavaScript array
/**
* Disorder the array
*
* @param {bool} preserve Returns a copy without modifying the original
* @return {array} The disordered array
*/
Array.prototype.disorder = function (preserve) {
var array = preserve ? this.slice() : this;
var disordered = [];