Functions

The following libraries are available in Functions:

Library NameDescription
XHRThe XHR library is used to enable the developer to send HTTP or HTTPS requests to a remote web server and load the response data back into a Function. This library is perfect for third-party authentication or triggering webhooks from a Function.
KV StoreThis library allows access to the KV store. It's a persistent key value store that acts as a database for your Functions. The KV store database is globally distributed and eventually consistent. Data in the KV store is shared at a subscribe key level.
Advanced MathGlobal (lat-long) coordinate and geometry functions.
CryptoThe Crypto library provides encryption and decryption functionality in an Function.
UtilsSimple utility functions that didn't belong anywhere else.
Codec/authProvides an encoder for HTTP basic auth credentials.
Codec/base64Provides an encoder and decoder for Base64 strings.
Codec/query_stringProvides an encoder and decoder for URI query parameters.
PubNubThe PubNub library allows you to leverage many of the client SDK features supported by the PubNub Platform.
vaultRead-only database to retrieve secrets.
Features not yet available in Functions

Some JavaScript features that you may expect to see, but aren't yet available in Functions:

  • Native node modules
  • async/await
  • Access to process and some other global variables
  • Ability to install third-party modules via npm
Last updated on
On this page