Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Div
classapi-page

fluid.expect(name, members, target)

Section
Column
width70%

Checks an object for a list of members.

Code Block
javascript
javascript
bgColorwhite
borderStylenonejavascript
fluid.expect(name, members, target);

File name: RendererUtilities.js

Parameters

Span
classborderless-table

name

(String) A name for the component, to be used in any error message

members

(Arrayable) A list of member names

target

(Object) The object to examine

Return Value

Span
classborderless-table

None

Throws an error if one of the listed members is not found in target.

Column
width5%

Column

See Also


Example

Code Block
javascript
javascript
var obj = {
    a: foo,
    b: bar
};
fluid.expect("My Test Object", ["a", "b", "c"], obj);

In this example, fluid.expect() will throw an error, with the string "My Test Object missing required parameter c."