Last active
December 21, 2019 11:09
-
-
Save kiraind/d2ef68f8fd57ac71689295f96d1b2186 to your computer and use it in GitHub Desktop.
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
АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ | |
абвгдеёжзийклмнопрстуфхцчшщъыьэюя | |
ABCDEFGHIJKLMNOPQRSTUVWXYZ | |
abcdefghijklmnopqrstuvwxyz | |
0123456789 | |
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ | |
январь | |
февраль | |
март | |
апрель | |
май | |
июнь | |
июль | |
август | |
сентябрь | |
октябрь | |
ноябрь | |
декабрь | |
января | |
февраля | |
марта | |
апреля | |
мая | |
июня | |
июля | |
августа | |
сентября | |
октября | |
ноября | |
декабря | |
/** | |
* Converts string of chars to object-map | |
* @param {string} str | |
* @return {object} | |
*/ | |
function stringToObject(str) { | |
return str | |
.split('') | |
.reduce((obj, char, i) => { | |
obj[char] = i | |
return obj | |
}, {}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment