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
// Вычисление расхождения массивов | |
// Важно: | |
// - Порядок элементов не учитывается | |
// - Повторение элементов не учитывается | |
// - Вложенные типы должны быть примитивными значениями (строками, числами, булевыми значениями) | |
const arraysDiff = (origin, base) => origin.filter(x => !base.includes(x)); | |
// Определение пустого объекта (без свойств) | |
const isEmpty = (object) => { | |
if (!(object instanceof Object)) { |