# jfaas

> jFaaS Unified wrapper for calling different FaaS providers

Latest version **0.0.3** (published 2020-08-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install jfaas
pnpm add jfaas
yarn add jfaas
bun add jfaas
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2020-08-05 |
| First published | 2020-08-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.2.0 |
| Dependencies | 2 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jakob Wallnoefer |
| Maintainers | jakob.wallnoefer |

## Links

- npm: https://www.npmjs.com/package/jfaas
- npm.io page: https://npm.io/package/jfaas

## Dependencies (2)

- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.726.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0

## Recent versions

- 0.0.3 (latest) — 2020-08-05
- 0.0.2 — 2020-08-05
- 0.0.1 — 2020-08-05

## README

<h1 align="center">jFaaS</h2>
<h2 align="center">Unified wrapper for calling different FaaS providers</h2>

```js
jfaas.call('myAmazonfunc', { a: 1 }, { amazon: { ...config }})
jfaas.call('myGooglefunc', { a: 1 }, { google: { ...config }})
```

## Install

Requires NodeJS >= 10.2.0

`npm i jfaas`


## Usage

`jfaas.call` returns a `Promise` that resolves to an `Object` of what the FaaS function returned. 

```js
const jfaas = require('jfaas')

// If it's a Google Cloud Function
jfaas.call('mygreetingfunction', { name: 'Jon Doe' }, { 
  google: { 
    projectName: 'myproject',
    region: 'us-central1'
  } 
})
  .then(resObject => console.log(resObject))


// If it's a Amazon Lambda Function
jfaas.call('mygreetingfunction', { name: 'Jon Doe' }, { 
  amazon: {
    region: 'us-east-2'
  }
})
  .then(resObject => console.log(resObject))

// { message: 'Hello, Jon Doe' }
// { message: 'Hello, Jon Doe' }
```

#### ES2015


```js
import jfaas from 'jfaas'

jfaas.call(...)
```

```js 
import { call } from 'jfaas'

call(...) 
```

## License

MIT

---
_Source: https://npm.io/package/jfaas · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
