๐Ÿ“ฆ shieldfy / is-serverless

๐Ÿ“„ README.md ยท 32 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32# is-serverless

Detection library for serverless environment, currently supports ([AWS Lambda](https://aws.amazon.com/lambda/), [GCP cloud functions](https://cloud.google.com/functions/), [Azure functions](https://azure.microsoft.com/en-in/services/functions/), [Cloudflare workers](https://workers.cloudflare.com))

## Inspiration

This package inspired by `is-lambda` package by [@watson](https://github.com/watson)

## Installation

```
npm install is-serverless
```

## Usage

```js
var isServerless = require('is-serverless')

if (isServerless.result) {
  console.log('The code is running on a serverless environment : ' + isServerless.whichOne)
}
```

## Contribution

Feel free to fork, commit and submit pull request if you find a bug, or you want to add support to a new environment. Contributions are very welcome.


## License

MIT