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