Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

api util

Ayhan Rashidov edited this page Nov 22, 2021 · 5 revisions

$.util API

Reference

  • SAP Help

https://help.sap.com/doc/3de842783af24336b6305a3c0223a369/2.0.03/en-US/$.util.html

  • Module

https://github.com/SAP/xsk/tree/main/modules/api/api-xsjs/src/main/resources/META-INF/dirigible/xsk/util

  • Sample usage:
var util = $.util;
var randomID = util.createUuid(); // return random uuid

// Uint8Array
var arrayBuffer = [84,104,105,115,32,105,115,32,97,32,85,105,110,116,
                          56,65,114,114,97,121,32,99,111,110,118,101,114,116,
                          101,100,32,116,111,32,97,32,115,116,114,105,110,103];

var convertedBuff = util.stringify(arrayBuffer); // return converted arrayBuffer to String

let result = `\n randomID is : ${randomID} `;
result += `\n convertedBuff is: ${arrayBuffer} `;
$.response.setBody(result);
  • Coverage
Classes Description Status
SAXParser Class for parsing XML. It is based on expat.
Zip Class for manipulation of zip archives. ⚠️
Members Description Type
createUuid() Returns a unique UUID. String
stringify(data) Recieves UintArray and return converted value. String
  • Issues

https://github.com/SAP/xsk/issues/16

  • Unit Tests

https://github.com/SAP/xsk/blob/main/modules/engines/engine-xsjs/src/test/resources/test/xsk/util/util.xsjs

  • Integration Tests ❌

Wiki icons legend

✅ - Feature implemented and working as supposed.
⚠️ - Feature partially implemented and needs to be finished.
❌ - Feature not implemented yet.

Project

Architecture

Tips & Tricks

Infrastructure

Troubleshooting guide

Clone this wiki locally