Skip to content

check if your code running inside a serverless function or not

License

Notifications You must be signed in to change notification settings

shieldfy/is-serverless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-serverless

Detection library for serverless environment, currently supports (AWS Lambda, GCP cloud functions, Azure functions, Cloudflare workers)

Inspiration

This package inspired by is-lambda package by @watson

Installation

npm install is-serverless

Usage

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

Releases

No releases published

Packages

No packages published