Yahoo! UI Library

yui  3.0.0pr2

Yahoo! UI Library > 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.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.


Copyright © 2008 Yahoo! Inc. All rights reserved.