Small helper function to cause a Function to emit an error response.
Usage: return failure(callback, 'An error occurred');
A Serverless callback.
An error message.
Works like NodeJS require
, but loads code from the requested Twilio Asset
path.
Usually, non-NPM code libraries included in your Function deployment bundle
cannot be accessed by their filename; instead, use either a Twilio Asset path
or a private Function name, depending on whether your code is in the assets
or the functions
directory.
Usage: const mylib = requireAsset('mylib');
The path to the Twilio Asset you want to load as code.
A NodeJS module.
Works like NodeJS require
, but loads code from the requested Twilio Function
name.
Usually, non-NPM code libraries included in your Function deployment bundle
cannot be accessed by their filename; instead, use either a Twilio Asset path
or a private Function name, depending on whether your code is in the assets
or the functions
directory.
Usage: const mylib = requireFunction('mylib');
The name of the Twilio Function whose code you want to load.
A NodeJS module.
Small helper function to cause a Function to emit a successful response.
Usage: return success(callback, {message: 'Completed successfully'});
A Serverless callback.
An optional JSON object to be included with the response.
Generated using TypeDoc
Miscellaneous utility functions.