Show:

jsPlumbUtil Class

Defined in: doc/api/util-api.js:1

A set of helper methods for use by jsPlumb.

Item Index

Methods

Methods

isArray

(
  • obj
)
Boolean static

Returns whether the given object is an Array.

Parameters:

  • obj Object

    Object to test

Returns:

Boolean:

True if the object is an Array, false otherwise.

isBoolean

(
  • obj
)
Boolean static

Returns whether the given object is a Boolean.

Parameters:

  • obj Object

    Object to test

Returns:

Boolean:

True if the object is a Boolean, false otherwise.

isDate

(
  • obj
)
Boolean static

Returns whether the given object is a Date.

Parameters:

  • obj Object

    Object to test

Returns:

Boolean:

True if the object is a Date, false otherwise.

isEmpty

(
  • obj
)
Boolean static

Returns whether the given object (an Object or Array) is empty.

Parameters:

  • obj Object

    Object to test

Returns:

Boolean:

True if the object is empty, false otherwise.

isFunction

(
  • obj
)
Boolean static

Returns whether the given object is a Function.

Parameters:

  • obj Object

    Object to test

Returns:

Boolean:

True if the object is a Function, false otherwise.

isNull

(
  • obj
)
Boolean static

Returns whether the given object is null.

Parameters:

  • obj Object

    Object to test

Returns:

Boolean:

True if the object is null, false otherwise.

isNumber

(
  • obj
)
Boolean static

Returns whether the given object is a Number.

Parameters:

  • obj Object

    Object to test

Returns:

Boolean:

True if the object is a Number, false otherwise.

isObject

(
  • obj
)
Boolean static

Returns whether the given object is an Object.

Parameters:

  • obj Object

    Object to test

Returns:

Boolean:

True if the object is an Object, false otherwise.

isString

(
  • obj
)
Boolean static

Returns whether the given object is a String.

Parameters:

  • obj Object

    Object to test

Returns:

Boolean:

True if the object is a String, false otherwise.

merge

(
  • a
  • b
  • [String[]
)
static

Merges one object into another, optionally folding individual values into arrays.

Parameters:

  • a Object

    Object to merge into

  • b Object

    Object to merge from.

  • [String[] Object optional

    [collations] Optional list of parameter keys for values that, if present in both 'a' and 'b', should result in an array with values from each (rather than the default behaviour of overwriting a's value with b's)