Icard/angular-clarity-master(work.../node_modules/lit-html/development/directives/if-defined.js

14 lines
409 B
JavaScript
Raw Normal View History

2024-07-16 14:55:36 +00:00
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
import { nothing } from '../lit-html.js';
/**
* For AttributeParts, sets the attribute if the value is defined and removes
* the attribute if the value is undefined.
*
* For other part types, this directive is a no-op.
*/
export const ifDefined = (value) => value ?? nothing;
//# sourceMappingURL=if-defined.js.map