Toggle menu

JavaScript Libraries

The following JavaScript libraries are shipped with iCM and are available server-side to use in Forms and End Points.

The JavaScript libraries that come packaged with iCM are held in the API Server. They form a module system, similar to that of Node.js, with modules loaded using require('module_name'); which returns a JavaScript object.

We recommend loading all required modules at the top of the script that uses them, and to give the returned objects the same name as their respective modules, for example:

const axios = require('axios'); //loads the axios library

Once loaded these variables are then treated as namespaces for the modules. See the relevant documentation below for examples.

Only the libraries supplied by GOSS Interactive can be used in this way. It is not possible to add additional libraries to the API Server. The upgrade and patch process involves reinstalling the API Server so only the default libraries supplied with iCM will be present after such work. If there's a library you would like to see included, let us know!

adm-zip

This module can create and extract zip files, both in memory and on disk.

apiclient

This module is used to send a request to a service on an API Server.

async

Async is a utility module which provides functions for working with asynchronous JavaScript.

axios

This module provides a promise based HTTP client.

base64codec

Used to convert UTF-8 strings to and from base64.

crypto-js

CryptoJs is a collection of standard and secure cryptographic algorithms implemented in JavaScript.

csv

The csv package contains four modules which can generate, parse, stringify and transform csv text and JavaScript arrays and objects.

decimal.js

This library can be used to handle floating point numbers and is particularly useful when working with currency and payments.

fs-extra

Includes all of the methods of the native fs and adds extra file system methods.

hash

Generates either an MD5 or SHA1 hash.

html

Used to escape or unescape HTML.

jsonpath-plus

JSONPath helps with the querying, analysing and transformation of JSON and JavaScript objects.

mathjs

mathjs features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types.

merge

Merges multiple objects into one.

moment

A library for parsing, validating, manipulating, and formatting dates.

proj4js

A JavaScript library to transform point coordinates from one coordinate system to another.

request

This module performs http requests.

strong-soap

This module lets you connect to web services using SOAP.

synchronise

Allows asynchronous functions to be executed synchronously.

tar.gz

This module provides gzip tarball tools.

underscore

Underscore is a JavaScript library providing over one hundred functions.

uuid

Generates version 1, 3, 4 and 5 rfc4122 UUIDs.

xml2js

Parses xml and converts xml to and from JavaScript objects.

xmldoc

A simple XML parser. If all you need to do is parse XML, use this one.

xmldom

A fully featured XML parser and builder.

Share this page

Facebook icon Twitter icon email icon

Print

print icon