AsyncUtils ReadMe (Managed Package)

For the managed package runtime, this page contains an AsyncUtils ReadMe for each Vlocity release.

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

Vlocity Insurance and Health Spring '20

This module exposes a collection of utilities designed to simplify asynchronous operations.

ns/asyncUtils.debounce(func, wait, immediate)

Delay the execution of a function for the given amount of time. Use to throttle the the call rate of a method that can be repeatedly called.

Kind: static method of ns/asyncUtils

Param

Type

Description

func

function

Function to execute after the given duration.

wait

number

Time in milliseconds to delay.

immediate

boolean

When true, will execute on the front end onf the duration instead of after.

ns/asyncUtils.delay(waitFor, [result])

Delays execution in the form of a promise.

Kind: static method of ns/asyncUtils

Param

Type

Description

waitFor

number

Number of milliseconds to delay by.

[result]

*

Pass through a previous result.