Utils
Using Nexus utils inside the script
File Utils
Converts file data to JSON
XML Utils
convertJSONtoXML: Converts JSON to XML.
convertXMLtoJSON: Converts XML to JSON.
Date Utils
format: Converts date to the required format.
Accepts 2 parameters.
Date
Format
add: Adds the given date by the amount & unit of datetime specified.
Accepts 3 parameters.
Date
Amount
Unit of Datetime (year/years/y, month/months/M, week/weeks/w, day/days/d, hour/hours/h, minute/minutes/m, second/seconds/s, millisecond/milliseconds/ms, quarter/quarters/Q)
subtract: Substracts the given date by the amount & unit of datetime specified.
Accepts 3 parameters.
Date
Amount
Unit of Datetime (year/years/y, month/months/M, week/weeks/w, day/days/d, hour/hours/h, minute/minutes/m, second/seconds/s, millisecond/milliseconds/ms, quarter/quarters/Q)
isValidDate: Returns true if the date provided is valid.
convertDateToISO: Converts date object to ISO.
convertISOToDate: Converts ISO to a date object.
parse: Converts given string date to a date object.
Accepts 2 parameters.
Date in string
format - optional.If provided converts the date string to the provided format.
Compression Utils
1. decompress: Decodes the given data.
Accepts 2 parameters.
input
inputEncoding/decompressoptions (ByteArray/Buffer/Base64/BinaryString/StorageBinaryString) - Default is Base64.
2. compress: Encodes the given data.
Accepts 2 parameters.
input
outputEncoding/compressoptions (ByteArray/Buffer/Base64/BinaryString/StorageBinaryString) - Default is Base64.
Last updated
Was this helpful?