Commit Graph

31 Commits

Author SHA1 Message Date
Jeremy Ashkenas
813bb57bf0 Underscore.js 1.2.3 2011-12-07 10:12:08 -05:00
Jeremy Ashkenas
9e41927293 rolling back to the previous implementation of 'each' ... cancels out #385 2011-12-06 17:33:43 -05:00
John-David Dalton
4a5c2ac818 underscore: Add unit tests and cleanup code for for-in issues. [jddalton] 2011-12-03 03:26:50 -05:00
Jeremy Ashkenas
7653c5fe09 Issue #309, adding symmetric difference as _.symDifference, and making _.difference accept any number of arguments. 2011-11-23 12:42:22 -05:00
David Hirtle
05c107576b Fix bug with _.last(a, n) incorrectly handling n > a.length 2011-11-08 01:13:08 -08:00
Jeremy Ashkenas
4b2de2e107 Fixes #341, flattening arrays in the context of taking a union shouldn't be deep. Adding a shallow parameter to _.flatten() 2011-10-19 15:59:53 -04:00
Jeremy Ashkenas
ac191a28a5 merging in #324 as _.initial 2011-10-05 15:32:34 -04:00
Pier Paolo Ramon
dcda142655 Tests for _.init 2011-10-05 14:14:51 +02:00
Jeremy Ashkenas
d79cd48bc5 Merge pull request #285 from malclocke/add_index_argument_to_last
Add an optional index argument to _.last()
2011-10-04 13:06:07 -07:00
Jeremy Ashkenas
7d0e4169a9 shortening module names. 2011-10-04 15:56:32 -04:00
Malcolm Locke
e449b00a26 Add guard check to _.last()
Allows _.last() to work as expected with _.map().
2011-09-01 01:10:10 +12:00
Malcolm Locke
a8f0445192 Add an optional index argument to _.last()
This makes _.last() behave the same as _.first().  Passing an optional
second argument n will return the last n elements of the array.
2011-08-31 22:39:05 +12:00
Jeremy Ashkenas
03b341d063 Merging in #194, adding an iterator to _.uniq 2011-08-03 11:32:31 -04:00
Jeremy Ashkenas
0ec859a142 Issue #225, adding _.union, _.difference, to complement _.without and _.intersection. 2011-07-12 16:48:30 -04:00
Alfredo Mesen
b9307163b9 Add optional iterator to _.uniq 2011-05-03 21:16:57 -06:00
Samuel Clay
7aaf3616df Issue #107: Fixing issue with _.first([1,2,3], 0) returning first element instead of empty array. 2011-01-27 11:38:06 -05:00
Jeremy Ashkenas
d2d6cfe667 Rework of #68, to use a flag to indexOf, instead of a separate function. 2010-12-17 10:57:12 -05:00
Ryan W Tenney
cdcf18b79c Improve compliance with Array methods in ES5 when passed a null value. (ES5 Array methods treat null like []) 2010-12-06 23:36:54 -05:00
Ryan W Tenney
2de76e065e Escaped lts, gts and amps in the test case descriptions. 2010-10-05 22:33:16 -04:00
Michael Wolf
83c7a006cb fix tyop 2010-09-09 18:20:08 -05:00
Jeremy Ashkenas
d7acbca2ce reverted _.buildLookup, restoring _.without to it's previous implementation, adding a test for object identity 2010-02-24 12:53:35 -05:00
Jeremy Ashkenas
2afcffb30a added guards to _.first and _.rest and tests, they now work as function parameters to _.map 2009-12-07 23:36:31 -05:00
Jeremy Ashkenas
4b2744a75a 0.4.6 is on the books, with kylichuku's range function 2009-11-30 23:20:11 -05:00
Jeremy Ashkenas
ae968a6ea0 Underscore 0.4.5, with first/rest, head/tail, and all Array functions guaranteed to work on 'arguments' objects. Many method implementations reworked to use _.rest() 2009-11-19 09:37:56 -05:00
Luke Sutton
8cac2d5bd7 Add init(), tail() and reverse() Array functions. Alias first() to head(); 2009-11-19 11:07:14 +10:30
Jeremy Ashkenas
4f0afda61c adding OO-style object wrapping (thanks macournoyer) -- now you can to _(array).each(); 2009-11-07 12:39:59 -05:00
Jeremy Ashkenas
4a83fcdd26 version 0.2.0 is out, with inject -> reduce, JS standard methodname aliases, a compose(), and a lastIndexOf() 2009-10-28 18:49:50 -04:00
Jeremy Ashkenas
5e3f783a23 docs done -- going back to code comments 2009-10-27 12:29:24 -04:00
Jeremy Ashkenas
d229e822e7 added an _.zip() 2009-10-26 09:15:14 -04:00
Jeremy Ashkenas
cf61edffa8 merged some tests 2009-10-26 08:43:10 -04:00
Jeremy Ashkenas
5c46c60b06 finished off the complete test suite for underscore -- let's polish off the corners and provide some docs 2009-10-26 08:40:14 -04:00