lowdefy/packages/docs/operators/_base64.yaml
2021-01-27 18:02:28 +02:00

56 lines
1.7 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: _base64
pageTitle: _base64
description: |
The `_base64` operator converts strings to and from [base64](https://en.wikipedia.org/wiki/Base64) format.
methods:
- name: decode
types: |
```
(value: string): string
```
description: |
The `_base64.decode` method decodes base64 encoded content into an ASCII string.
arguments: |
###### string
The string to decode.
examples: |
###### Decode a base64 string:
```yaml
_base64.decode: SGVsbG8=
```
Returns: `"Hello"`.
- name: encode
types: |
```
(value: string): string
```
description: |
The `_base64.encode` method base64 encodes a ASCII string.
arguments: |
###### string
The string to encode.
examples: |
###### Encode a string as base64:
```yaml
_base64.encode: Hello
```
Returns: `"SGVsbG8="`.