changes.mady.by.user Anastasia Cheetham
Saved on Oct 01, 2010
...
Checks an object for a list of members.
fluid.expect(name, members, target);
File name: RendererUtilities.js
RendererUtilities.js
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
None
Throws an error if one of the listed members is not found in target.
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."
fluid.expect()