-core has the basics of what you need to build a web application. -more is stuff we want to release, but not stuff everyone is likely to use as often. yes, Array.unique is in -more, and YOU need it, but most people don't. We try to keep the -core as lean as possible.
On Wed, Dec 23, 2009 at 1:29 PM, Trevor Orr <[email protected]> wrote: > okay sound unique is already in more, guess I should be looking there more, > thanks. One question, why are there array functions in core and more? For > array why not just put them all in core? > > > > 2009/12/23 Fábio M. Costa <[email protected]> > > by the way: >> >> [].combine([1,2,2,3,4,4,4]) will return [1,2,3,4], and this function is >> still into mootools more: >> >> http://mootools.net/docs/more/Native/Array.Extras#Array:unique >> >> You guys should look more at mootools-more (got it, more..more, yeah you >> got it). >> >> >> -- >> Fábio Miranda Costa >> Solucione Sistemas >> Engenheiro de interfaces >> >> >> >> On Wed, Dec 23, 2009 at 6:24 PM, Trevor Orr <[email protected]> wrote: >> >>> Cool, it now becomes. >>> >>> Array.prototype.unique = function() { >>> >>> var outArray = new Array(); >>> >>> this.each(function(val) { >>> outArray.include(val); >>> }); >>> >>> return outArray; >>> >>> } >>> >>> >>> On Wed, Dec 23, 2009 at 12:14 PM, Sanford Whiteman < >>> [email protected]> wrote: >>> >>>> > if (!outArray.contains(val)) { >>>> > outArray.push(val); >>>> > } >>>> >>>> You could use Array.include here. >>>> >>>> -- Sandy >>>> >>>> >>> >> >
