lowdefy/packages/docs/operators/_not.yaml

47 lines
1.4 KiB
YAML

# Copyright 2020-2021 Lowdefy, Inc
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
_ref:
path: templates/operators.yaml.njk
transformer: templates/operatorsMethodTransformer.js
vars:
pageId: _not
pageTitle: _not
types: |
```
(value: any): boolean
```
description: |
The `_not` operator returns the logical negation of the input. If the value is not a boolean, it will be converted to a boolean using javascript [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy) and [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) rules.
arguments: |
###### any
examples: |
###### Not `true` is `false`:
```yaml
_not: true
```
Returns: `false`
###### Return `true` for a falsy value:
```yaml
_not: null
```
Returns: `true`
###### Return `false` for a truthy value:
```yaml
_not: 100
```
Returns: `false`