/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
devtools/projects/shared-utils/src/lib/shared-utils.ts
29 строк
666 B
Joey Perrott
refactor: update license text to point to angular.dev (#57901)
24 сен 2024, 16:33
24 сен 2024, 16:33
9dbe6fc
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ // works with arrays of string, numbers and booleans export const arrayEquals = ( a: (string | number | boolean)[], b: (string | number | boolean)[], ): boolean => { if (a.length !== b.length) { return false; } if (a.length === 0) { return b.length === 0; } let equal; for (let i = 0; i < a.length; i++) { equal = i === 0 ? a[i] === b[i] : a[i] === b[i] && equal; if (!equal) { break; } } return equal ?? false; };