This documentation is currently being moved to our new documentation site.

Please view or edit the documentation there, instead.

If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

This functionality is Sneak Peek status. This means that the APIs may change. We welcome your feedback, ideas, and code, but please use caution if you use this new functionality.

fluid.expect(name, members, target)

Checks an object for a list of members.

fluid.expect(name, members, target);

File name: RendererUtilities.js

Parameters

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

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

See Also


Example

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."

  • No labels