1
0
Fork 0
forked from 0x2620/oxjs

fixes for DocPanel

This commit is contained in:
rolux 2011-05-07 19:52:33 +02:00
commit f5f19c1c11
5 changed files with 18 additions and 15 deletions

View file

@ -76,11 +76,9 @@ Ox.uid = (function() {
/*@
Ox.wrap <f> Wraps a value so that one can directly call any Ox function on it
Additionally, chain() allows for chaining, and value() returns the
original value. See examples for details.
(value) -> <o> wrapped value
chain <f> wrap the return value to allow chaining
value <f> unwrap the value wrapped by chain()
value <f> unwrap the value wrapped by <code>chain()</chain>
value <*> Any value
> Ox.wrap("foobar").repeat(2)
"foobarfoobar"
@ -91,6 +89,7 @@ Ox.wrap <f> Wraps a value so that one can directly call any Ox function on it
@*/
Ox.wrap = function(val, chained) {
// somewhat inspired by underscore.js
var wrapper = {
chain: function() {
wrapper.chained = true;
@ -1348,11 +1347,11 @@ Ox.isLeapYear = function(year, utc) {
/*@
Ox.makeDate <f> Takes a date, number or string, returns a date
> Ox.formatDate(Ox.makeDate(new Date('01/01/1970')), '%M/%D/%Y')
> Ox.formatDate(Ox.makeDate(new Date('01/01/1970')), '%m/%d/%Y')
'01/01/1970'
> Ox.formatDate(Ox.makeDate(0), '%M/%D/%Y')
> Ox.formatDate(Ox.makeDate(0), '%m/%d/%Y')
'01/01/1970'
> Ox.formatDate(Ox.makeDate('01/01/1970'), '%M/%D/%Y')
> Ox.formatDate(Ox.makeDate('01/01/1970'), '%m/%d/%Y')
'01/01/1970'
@*/
Ox.makeDate = function(date) {