Created
December 29, 2011 19:41
-
-
Save tav/1535871 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
# Public Domain (-) 2011 The Togethr Authors. | |
# See the Togethr UNLICENSE file for details. | |
define 'togethr', (exports, root) -> | |
lookup = [] | |
for base in exports.DIGITS_BASES | |
for c in [base...(base+10)] | |
lookup[c] = '' + (c - base) | |
exports.normaliseDigits = (s) -> | |
(lookup[s.charCodeAt(i)] for i in [0...s.length]).join '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment