/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/core/src/util/performance.ts
25 строк
766 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 */ const markedFeatures = new Set<string>(); // tslint:disable:ban /** * A guarded `performance.mark` for feature marking. * * This method exists because while all supported browser and node.js version supported by Angular * support performance.mark API. This is not the case for other environments such as JSDOM and * Cloudflare workers. */ export function performanceMarkFeature(feature: string): void { if (markedFeatures.has(feature)) { return; } markedFeatures.add(feature); performance?.mark?.('mark_feature_usage', {detail: {feature}}); }