Skip to content

Commit

Permalink
Minor comment cleanup. Enyo-DCO-1.1-Signed-off-by: Jim Tang <jim.tang…
Browse files Browse the repository at this point in the history
…@palm.com>
  • Loading branch information
Jim Tang committed Jan 16, 2013
1 parent 7ae37ca commit f3d5348
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions source/kernel/lang.js
Expand Up @@ -13,14 +13,15 @@
//* @public

/**
Sets object _name_ to _value_. _name_ can use dot notation and intermediate objects are created as necessary.
Sets object _name_ to _value_. _name_ may use dot notation, and
intermediate objects are created as necessary.
// set foo.bar.baz to 3. If foo or foo.bar do not exist, they are created.
// set foo.bar.baz to 3; if foo or foo.bar do not exist, they are created
enyo.setObject("foo.bar.baz", 3);
Optionally, _name_ can be relative to object _context_.
Optionally, _name_ may be relative to object _context_.
// create foo.zot and sets foo.zot.zap to null.
// create foo.zot and set foo.zot.zap to null
enyo.setObject("zot.zap", null, foo);
*/
enyo.setObject = function(name, value, context) {
Expand All @@ -29,16 +30,17 @@
};

/**
Gets object _name_. _name_ can use dot notation. Intermediate objects are created if _create_ argument is truthy.
Gets object _name_. _name_ may use dot notation. Intermediate objects
are created if the _create_ argument is truthy.
// get the value of foo.bar, or undefined if foo doesn't exist.
// get the value of foo.bar, or undefined if foo doesn't exist
var value = enyo.getObject("foo.bar");
// get the value of foo.bar. If foo.bar doesn't exist,
// it's assigned an empty object, which is returned
// get the value of foo.bar; if foo.bar doesn't exist,
// it's assigned an empty object, which is then returned
var value = enyo.getObject("foo.bar", true);
Optionally, _name_ can be relative to object _context_.
Optionally, _name_ may be relative to object _context_.
// get the value of foo.zot.zap, or undefined if foo.zot doesn't exist
var value = enyo.getObject("zot.zap", false, foo);
Expand All @@ -47,10 +49,11 @@
return enyo._getProp(name.split("."), create, context);
};

//* Returns a random Integer between 0 and inBound (0 <= results < inBound).
//
// var randomLetter = String.fromCharCode(enyo.irand(26) + 97);
//
/**
Returns a random Integer between 0 and _inBound_ (0 <= random integer < _inBound_).
var randomLetter = String.fromCharCode(enyo.irand(26) + 97);
*/
enyo.irand = function(inBound) {
return Math.floor(Math.random() * inBound);
};
Expand Down

0 comments on commit f3d5348

Please sign in to comment.