1 | ;
|
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 | */
|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
10 | exports.updateBufferV2Enabled = void 0;
|
11 | function isEnabled(variable) {
|
12 | return variable === '1' || variable.toLowerCase() === 'true';
|
13 | }
|
14 | function 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.
|
19 | const updateBufferV2 = process.env['NG_UPDATE_BUFFER_V2'];
|
20 | exports.updateBufferV2Enabled = isPresent(updateBufferV2) && isEnabled(updateBufferV2);
|