Smart Polling

yui  1.0.0

Smart Polling > yui > YUI~object
Search:
 
Filters

Class YUI~object

Adds the following Object utilities to the YUI instance

Methods

Object

static object Object ( o )
Y.Object(o) returns a new object based upon the supplied object.
Parameters:
o <object> the supplier object
Returns: object
the new object

Object.each

static YUI Object.each ( o , f , c , proto )
Executes a function on each item. The function receives the value, the key, and the object as paramters (in that order).
Parameters:
o <object> the object to iterate
f <function> the function to execute
c <object> the execution context
proto <boolean> include proto
Returns: YUI
the YUI instance

Object.hasKey

static boolean Object.hasKey ( o , k )
Returns true if the object contains a given key
Parameters:
o <object> an object
k <object> the key to query
Returns: boolean
true if the object contains the key

Object.hasValue

static boolean Object.hasValue ( o , v )
Returns true if the object contains a given value
Parameters:
o <object> an object
v <object> the value to query
Returns: boolean
true if the object contains the value

Object.keys

static string[] Object.keys ( o )
Returns an array containing the object's keys
Parameters:
o <object> an object
Returns: string[]
the keys

Object.owns

static boolean Object.owns ( o , p )
Determines whether or not the property was added to the object instance. Returns false if the property is not present in the object, or was inherited from the prototype.
Parameters:
o <any> The object being testing
p <string> the property to look for
Returns: boolean
true if the object has the property on the instance
Deprecated Safari 1.x support has been removed, so this is simply a wrapper for the native implementation. Use the native implementation directly instead.

Object.size

static int Object.size ( o )
Returns the size of an object
Parameters:
o <object> an object
Returns: int
the size

Object.values

static Array Object.values ( o )
Returns an array containing the object's values
Parameters:
o <object> an object
Returns: Array
the values


Copyright © 2009 Yahoo! Inc. All rights reserved.