Created
May 8, 2013 13:54
-
-
Save phaistonian/5540574 to your computer and use it in GitHub Desktop.
A d3_min variation. Use native Math.min method if applicable for faster results.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d3.min = function(array, f) { | |
var i = -1, n = array.length, a, b; | |
if (!f) { | |
for (var y = 0; parseInt(array[y]); y++) {} | |
if (y === array.length) return Math.min.apply(Math, array); | |
} | |
// Continue existing logic below |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment