Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Include Page
sneak peek warning
sneak peek warning
{div:class=} h1.
Wiki Markup
Div
classapi-page

fluid.expect(name,

members,

target)

{section} {column:width=70%} Checks an object for a list of members. {code:javascript|borderStyle=none|bgColor=white}

Section
Column
width70%

Checks an object for a list of members.

Code Block
javascript
javascript
bgColorwhite
borderStylenone

fluid.expect(name, members, target);
{code} *

File

name:

* {{

RendererUtilities.js

}} h2. Parameters {span:class=

Parameters

Span
classborderless-table

} |*{{name}}*|

name

(String)

A

name

for

the

component,

to

be

used

in

any

error

message | |*{{members}}*|

message

members

(Arrayable)

A

list

of

member

names | |*{{target}}*|

names

target

(Object)

The

object

to

examine | {span} h2. Return Value {span:class=borderless-table} |*None*| Throws an error if one of the listed {{members}} is not found in {{target}}. {span} {column} {column:width=5%} {column} {column} h3. See Also * [related.things] {column} {section} ---- h3. Example {code:javascript}

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);
{code}

In

this

example,

{{

fluid.expect()

}}

will

throw

an

error,

with

the

string

"My

Test

Object

missing

required

parameter

c."

{div}