Last active
December 14, 2015 18:47
-
-
Save mwurzberger/a897b75f87dbeaed689c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function roundToDecimal(val, decimals) { | |
return Number(Math.round(val+'e'+decimals)+'e-'+decimals); | |
} | |
var len = arguments.length; | |
for (var i = 1; i < len; i++) { | |
arguments[i]; | |
} | |
var alphaNums = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; | |
function getAlphaValue(_value) { | |
var value = String(_value).toLowerCase(); | |
return alphaNums.indexOf(value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment