JMap.Util.asyncProcess
Run the parameter function after one or multiple delays.
You can cancel the repetition by running the function returned by asyncProcess
The function to run
An array of delay in milliseconds
a function that will cancel the process if called
JMap.Util.checkJmapId
Throws an Error if the passed Id is not a valid JMap Id, otherwise does nothing. You can use this method as a safeguard in your methods that accept JMap Ids. JMap.Util.checkJmapId always run a strict check on the passed value, i.e. the string "123" will not pass. If you want the value to be compliant, you can use JMap.Util.getJmapIdAsIntegerIfPossible to transform it.
The JMap Id to validate
Optional message that will be used in the thrown error if the passed value doesn't pass the check.
JMap.Util.getJmapIdAsIntegerIfPossible
Converts the passed Id as a numeric JMap Id if possible. This utility function can be used to transform serialized or otherwise stringified JMap Ids that would normally be expressed as integers. For instance, if you extract a JMap Id from a query string, the query param "3" would be returned a an integer (3). If the passed value cannot be converted to a valid JMap numeric Id, it will be returned as-is, if valid. If not valid, an error is thrown.
The JMap Id to convert
JMap.Util.isJMapId
Validates if the value passed is either a string uuid (for instance, "f3af01ab-4042-4ccf-be04-33dc96228ce7"), or a numeric ID (integer, can be negative) If the allowStringNumber param is true, the string "123" will be considered as a valid numeric ID. allowStringNumber is false by default
The JMap Id to validate
Optional parameter. false by default.
JMap.Util.loadJSFile
Load an external JS File then resolve when file has been loaded.
the JS URL to load
JMap.Util
Here you'll find all JMap utility methods