This example demonstrates that you don't need to do anything special to use package dependencies in cloud functions, even on AWS. This is because faast.js uses webpack to bundle dependencies in the cloud function module for you.
In this example, the code in functions.ts
imports lodash
and it just works.
- Node 8+.
$ npm install
$ npm run build
$ node dist/index.js
square([0,1,2]) = [0,1,4]