JavaScript Support
On this page
Atlas Functions fully support JavaScript ES5 syntax as well as most modern JavaScript features included in EcmaScript 2015 (ES6) and more recent releases. They can also access most Node.js built-in modules.
Syntax
Feature | Supported |
---|---|
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
No | |
Yes |
Built-In Objects
Built-In Methods & Properties
Built-In Modules
You can import and use standard Node built-in modules in Functions. Atlas Functions support most built-ins with either full or partial support. Some built-ins that are not suited for serverless workloads are not supported.
Note
The supported modules and partially supported modules are compatible with Node API version 10.18.1. Avoid using APIs in these modules introduced after or deprecated since Node 10.18.1.
Fully Supported Modules
Atlas Functions fully support the following built-in modules:
Partially Supported Modules
Atlas Functions support a subset of the functionality of the following modules.
dgram
Atlas Functions support the following dgram
APIs:
Atlas Functions do not support the following dgram
APIs:
dns
Atlas Functions support the dns module with the following exceptions:
Atlas Functions do not support the dns Promises API
Atlas Functions do not support resolver.cancel()
fs
Atlas Functions support the following fs
APIs:
http
, http/2
and https
Atlas Functions support all of the http and https APIs except for the Server class functionality.
Similarly, Atlas Functions support only the client-side APIs of http/2.
Note
axios Supported for Sending HTTP Requests
Atlas Functions support v1.3.6 of the HTTP library, axios. You can replace HTTP requests sent through an HTTP Service client with calls to an HTTP library like axios.
process
Atlas Functions support the following process
APIs:
util
Atlas Functions support the util module with the following exceptions:
Atlas Functions do not support util.TextEncoder
Atlas Functions do not support util.TextDecoder
crypto
Atlas Functions support the crypto module with the following exceptions:
Atlas Functions do not support crypto.createDiffieHellman()
Atlas Functions do not support crypto.createDiffieHellmanGroup()
Atlas Functions do not support crypto.createECDH()
Unsupported Modules
Atlas Functions do not support the following built-in modules:
child_process
cluster
domain
readline
v8
vm