UNPKG

797 BJavaScriptView Raw
1"use strict";
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.updateBufferV2Enabled = void 0;
11function isEnabled(variable) {
12 return variable === '1' || variable.toLowerCase() === 'true';
13}
14function isPresent(variable) {
15 return typeof variable === 'string' && variable !== '';
16}
17// Use UpdateBuffer2, which uses magic-string internally.
18// TODO: Switch this for the next major release to use UpdateBuffer2 by default.
19const updateBufferV2 = process.env['NG_UPDATE_BUFFER_V2'];
20exports.updateBufferV2Enabled = isPresent(updateBufferV2) && isEnabled(updateBufferV2);