Skip to content

Instantly share code, notes, and snippets.


Artem Kuznecov artemijeka

  • ИП Кузнецов Артем Андреевич
  • Samara
  • 04:10 (UTC +04:00)
View GitHub Profile
artemijeka /
Created November 18, 2021 19:21 — forked from gaearon/
How to Set Up Minification

In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.

Here's one way to set it up:

  1. Install Node.js
  2. Run npm init -y in your project folder (don't skip this step!)
  3. Run npm install terser

Now, to minify a file called like_button.js, run in the terminal:

yalovek / convertKeyboardKeysLatinToCyrillic.js
Created October 23, 2016 16:49
Convert keyboard keys from latin to cyrillic
View convertKeyboardKeysLatinToCyrillic.js
* Function for converting keyboard keys from latin to cyrillic
* @param {String} word Word on latin
* @return {String} Word converted to cyrillic
const convertKeyboardKeysLatinToCyrillic = word => {
const keyboardMap = {
'a': 'ф',
'b': 'и',
'c': 'c',