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
// Самый быстрый способ клонировать объект - пропустить его через | |
// функции JSON.parse() и JSON.stringify() - таким образом будут | |
// клонированы все свойства объекта на любой глубине вложенности | |
var clonedObject = (JSON.parse(JSON.stringify(originalObject))); |
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
function escapeRegExp(str) { | |
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); | |
} | |
function removeLetters(str, letters) { | |
return str.replace(new RegExp(escapeRegExp(letters), 'g'), ''); | |
} |
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
// ---- | |
// libsass (v3.3.2) | |
// ---- | |
@mixin placeholder { | |
&::-webkit-input-placeholder, | |
&::-moz-placeholder, | |
&:-moz-placeholder, | |
&:-ms-input-placeholder { | |
@content; |
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
<input type="email" placeholder="example@gmail.com" class="input"> |
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
<input type="email" placeholder="example@gmail.com" class="input"> |
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
<input type="email" placeholder="example@gmail.com" class="input"> |
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
<input type="email" placeholder="example@gmail.com" class="input"> |
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
<input type="text" placeholder="Normal input" class="input"> | |
<input type="text" placeholder="Shift right" class="input pl-shift-right"> | |
<input type="text" placeholder="Shift left" class="input pl-shift-left"> | |
<input type="text" placeholder="Slide down" class="input pl-slide-down"> | |
<input type="text" placeholder="Fade out" class="input pl-fade-out"> |
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
function getMessage(a, b){ | |
if (typeof a === "boolean") { | |
if(a == true){ | |
return "Переданное GIF-изображение анимировано и содержит " + b + " кадров"; | |
} | |
else if(a == false){ | |
return("Переданное GIF-изображение не анимировано"); | |
} | |
} | |
if(typeof(a) == "number"){ |
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
// Если первый аргумент, a, имеет тип boolean, то: | |
// Если он true, вернуть строку, в которую подставлен параметр b: | |
// 'Переданное GIF-изображение анимировано и содержит [b] кадров' | |
// Если он false, то вернуть строку: | |
// 'Переданное GIF-изображение не анимировано' | |
// | |
// Если первый аргумент имеет числовой тип, то вернуть строку: | |
// 'Переданное SVG-изображение содержит [a] объектов и [b * 4] аттрибутов' | |
// | |
// Если первый аргумент массив, то вернуть строку: |