# @axway/api-builder-plugin-fn-base64

> Base64 plugin

Latest version **5.0.2** (published 2022-10-07) · SEE LICENCE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install @axway/api-builder-plugin-fn-base64
pnpm add @axway/api-builder-plugin-fn-base64
yarn add @axway/api-builder-plugin-fn-base64
bun add @axway/api-builder-plugin-fn-base64
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.2 |
| Published | 2022-10-07 |
| First published | 2018-06-10 |
| Weekly downloads | 0 |
| License | SEE LICENCE IN LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 16 |
| Dependencies | 1 |
| Unpacked size | 17.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Axway |
| Maintainers | nkeranova, axway-npm, jamie.peabody, bladedancer, axway_darnaudov, ddimonov-axway, neon-axway, vchauhan, mdimitrova, pdzhorev, axway_alasdair, pltod2, pbozhkovaxway, mbonchev-axway, axway-vertex |
| Keywords | axway, amplify, api-builder, plugin, base64 |

## Links

- npm: https://www.npmjs.com/package/@axway/api-builder-plugin-fn-base64
- Homepage: https://platform.axway.com
- Issues: https://axway.com
- npm.io page: https://npm.io/package/@axway/api-builder-plugin-fn-base64

## Dependencies (1)

- [@axway/api-builder-sdk](https://npm.io/package/@axway/api-builder-sdk.md) 2.0.2

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 5.0.2 (latest) — 2022-10-07
- 5.0.1 (christie) — 2022-09-23
- 5.0.0 (austen) — 2022-09-09
- 4.1.6 (villasimius) — 2022-09-07
- 4.1.5 (unna) — 2022-08-26
- 4.1.4 (next) — 2022-07-26
- 4.1.3 (riga) — 2022-07-13
- 4.1.2 (qom) — 2022-06-20
- 1.0.0-6 (v4-preview3) — 2018-06-21
- 4.1.1 — 2022-05-17
- 4.1.0 — 2022-04-06
- 4.0.3 — 2021-10-08
- 4.0.2 — 2021-08-25
- 4.0.1 — 2021-04-07
- 4.0.0 — 2021-02-24
- … 45 more at https://npm.io/package/@axway/api-builder-plugin-fn-base64/versions

## README

# @axway/api-builder-plugin-fn-base64

## About

This plugin installs the Base64 flow-node to be used within [Axway API Builder's](https://www.axway.com/en/datasheet/axway-api-builder)
flow editor. The flow-node provides two methods:


### Encode
Encodes data into a string using the base64 encoding scheme. If the data is a Buffer or a string, its bytes will be encoded as-is. Otherwise, the data will be first converted using JSON.stringify, and then encoded.

| Param | Type | Required | Description |
| --- | --- | --- | --- |
| data | number\|boolean\|string\|object | y | The data to encode. |


### Decode
Decodes a base64 encoded string into the provided format (see "Decode data as" parameter).

| Param | Type | Required | Description |
| --- | --- | --- | --- |
| data | string | y | The base64 encoded string. |
| as | boolean\|buffer\|number\|object\|string | n | If "buffer", data will be returned as a Buffer. If "string", data will be converted to utf-8 String. If "number", the data will be converted to a utf-8 string and then parsed as base 10 integer. If "boolean”, the data will be converted to a utf-8 string and if "false", "0", or empty string, the value is false (otherwise, true). If "object", the value is converted to a utf-8 string and parsed using JSON.parse. Default: buffer |

## Getting started

1. Follow the [Getting Started Guide](https://docs.axway.com/bundle/api-builder/page/docs/getting_started/index.html)


## Install

After creating your API Builder service (`api-builder init`), you can install this plugin using npm:

```bash
npm install --no-optional @axway/api-builder-plugin-fn-base64
```

The "Base64" flow-node will then be available in the tools panel when creating or editing Flows.

## Changes

#### 5.0.2
- #7538: Update `@axway/api-builder-sdk` dependency.

#### 5.0.1
- #7517: Update @axway/api-builder-sdk dependency.

#### 5.0.0
- #6089: Breaking change: requires minimum Node.js version 16.x.

#### 4.1.6
- #7470: Update @axway/api-builder-test-utils devDependency.

#### 4.1.5
- #7495: Updated `README.md`.

#### 4.1.4
- #7466: Update @axway/api-builder-sdk dependency.

#### 4.1.3
- #7474: Internal dev-dependency move.

#### 4.1.2
- #7412: Pin in-house dependencies.

#### 4.1.1
- #7403: Internal dev-dependency change.

#### 4.1.0
- #6933: Replace peerDependency on @axway/api-builder-runtime with `engines.apibuilder`.

#### 4.0.3
- #7057: Updated documentation links.

#### 4.0.2
- #7010: Internal refactor of unit-tests.

#### 4.0.1
- #6801: Added internal unit-test.

#### 4.0.0
- #6555: Breaking change: Updated the `Encode` method to directly convert to base64 when data input is a raw Buffer.
- #6555: Updated the `Encode` method's description to reflect base64 encoding of strings and raw Buffer.
- #6555: Updated the `Decode` method's description and parameter `as` description with extra information about the expected decoded data format.

#### 3.0.0
**WARNING**: Installing this release can cause your application to emit a MISSING_KEY error(s) on startup and cause flows to be uneditable in the UI. If you encounter this issue, please contact Axway Support (support@axway.com) so that we may assist you with your upgrade.

- #6452: Breaking change: Added the `error` output to `Encode` method.
- #6452: Breaking change: Renamed `encoded` output to `next` in `Encode` method.
- #6452: Breaking change: Renamed `decoded` output to `next` in `Decode` method.
- #6452: Changed schema type of `Decode` method's `next` output to `oneOf` number, boolean, string, object.

#### 2.1.5
- #6413: Removed `axway-flow-sdk` dependency.

#### 2.1.4
- #6413: Migrate from `axway-flow-sdk` to `@axway/api-builder-sdk@1.0.0`.
- #6413: Previously, invalid arguments to `decode` would cause the flow to exit.  Now, the `error` output will be called.

#### 2.1.3
- #6315: Internal chore.

#### 2.1.1 - 2.1.2
- #6116: Internal cleanup chore.

#### 2.1.0
- #6093: Removed the explicit maximum supported Node.js version limitation in package.json.
- #6093: Internal test suite clean up.

#### 2.0.14
- #6026: Documents ranges of supported Node.js versions in package.json

#### 2.0.13
- #6074: Internal CI chore

#### 2.0.4 - 2.0.12
- #5891: Bump `axway-flow-sdk` dependency

#### 2.0.3
- #5711: Internal cleanup of npm scripts.

#### 2.0.2
- #5708: Internal changes to update mocha configuration

#### 2.0.1
- #5707: Internal cleanup to code coverage during build process.

#### 2.0.0
- #5742: Update `axway-flow-sdk` dependency to fix security vulnerability on `dot` module.
- #5742: Breaking Change: Minimum supported version of API Builder is now 4.5.0

#### 1.0.14
- #5050: Updating license text.

#### 1.0.8
- #4757: Changed SCM repository and associated internal cleanup.

## License

This code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.

---
_Source: https://npm.io/package/@axway/api-builder-plugin-fn-base64 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
