Skip to main content
Adaptive Insights
Knowledge and Support - Adaptive Insights

Adaptive Utility

ai.util

Functions

Method

Parameters

Returns

Description

apply( obj, config )

  • obj : Object
    The receiver of the properties
  • config : Object
    The source of the properties

 

Object

Copies all the properties of config to obj and returns obj.

format ( formatString, arg1, arg2....argN)

  • formatString : String
    A string with replace tokens. E.g 'There are {0} things'
  • arg1 : String The value to replace token {0}
  • arg2 : String Etc...

 

String

Used to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each token must be unique, and must increment in the format {0}, {1}, etc.

isDate( value )

  • value : Mixed
    The value to test

 

Boolean

Returns true if the passed value is a JavaScript Date object.

isUndefined( value )

  • value : Mixed
    The value to test

 

Boolean

Returns true if the passed value is 'undefined'.

isDefined( value )

  • value : Mixed
    The value to test

 

Boolean

Returns true if the passed value is not 'undefined'.

isArray( value )

  • value : Mixed 
  • The value to test

 

Boolean

Returns true if the passed value is a JavaScript array, otherwise false.

isString( value )

  • value : Mixed
    The value to test

 

Boolean

Returns true if the passed value is a string.

isNumber( value )

  • value : Mixed
    The value to test

 

Boolean

Returns true if the passed value is a number and is finite.

isBoolean( value )

  • value : Mixed The value to test

 

Boolean

Returns true if the passed value is true or false.

toArray( a, i, j )

 

Array

 

isPrimitive( value )

  • value : Mixed
    The value to test

 

Boolean

Returns true if the passed value is a String, Number or Boolean.

  • Was this article helpful?