UNPKG

@angular/cdk

Version:

Angular Material Component Development Kit

1 lines 858 B
{"version":3,"file":"boolean-property-DaaVhX5A.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/coercion/boolean-property.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Type describing the allowed values for a boolean input.\n * @docs-private\n */\nexport type BooleanInput = string | boolean | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\n}\n"],"names":[],"mappings":"AAcA;AACM,SAAU,qBAAqB,CAAC,KAAU,EAAA;IAC9C,OAAO,KAAK,IAAI,IAAI,IAAI,GAAG,KAAK,CAAA,CAAE,KAAK,OAAO;AAChD;;;;"}