Kit Cambridge
4fa97eb2fa
_.isBoolean should return true for boolean object wrappers.
2011-09-05 15:51:09 -06:00
Kit Cambridge
54245bc679
_.isEqual: Add an early comparison for NaN values.
2011-09-05 12:34:09 -06:00
Kit Cambridge
e9faa40108
Add a comprehensive test suite for isEqual.
2011-09-05 12:27:03 -06:00
Kit Cambridge
6f62f258cb
Add support for comparing string, number, and boolean object wrappers. Ignore inherited properties when deep comparing objects. Use a more efficient while loop for comparing arrays and array-like objects.
2011-09-05 12:25:59 -06:00
Kit Goncharov
d447165ed4
Merge pull request #1 from michaelficarra/isequal
...
Merging @michaelficarra's additions...
2011-09-04 16:37:05 -07:00
Michael Ficarra
bf3aa97c36
reverting some changes to isEqual that were a little too aggressive
2011-09-04 19:34:19 -04:00
Michael Ficarra
c7c57ca6ff
_.isEqual improvements
2011-07-15 18:15:10 -04:00
Kit Goncharov
a12d0035cb
_.isEqual: Ensure commutative equality for dates and RegExps.
2011-07-13 14:24:28 -06:00
Kit Goncharov
365eea6aa7
_.isEqual: Streamline the deep comparison algorithm and remove the dependency on _.keys.
2011-07-13 10:48:16 -06:00
Kit Goncharov
b6a02fa6bb
_.isEqual: Use a strict comparison to avoid an unnecessary division for false values.
2011-07-12 22:37:09 -06:00
Kit Goncharov
cf812e77bc
_.isEqual: Ensure that 0 and -0 are not equivalent. NaN values should be equal.
2011-07-12 22:17:12 -06:00
Kit Goncharov
9d0b43221a
_.isEqual: Move the internal eq method into the main closure. Remove strict type checking.
2011-07-12 20:22:05 -06:00
Kit Goncharov
e21b346cbf
_.isEqual: Compare object types rather than [[Class]] names.
2011-07-12 19:54:56 -06:00
Kit Goncharov
5c2c3ce464
Rewrite _.isEqual and add support for comparing cyclic structures.
2011-07-12 19:42:36 -06:00
Jeremy Ashkenas
727db393d5
Amending length check as discussed in 942d63
2011-07-12 17:01:04 -04:00
Jeremy Ashkenas
0ec859a142
Issue #225 , adding _.union, _.difference, to complement _.without and _.intersection.
2011-07-12 16:48:30 -04:00
Jeremy Ashkenas
942d63129b
Fixing silly commit. Thanks @cirwin
2011-07-12 15:27:42 -04:00
Jeremy Ashkenas
fbae682e8f
fixing comment for #239
2011-07-12 15:23:23 -04:00
Jeremy Ashkenas
5eaf71f101
removing somewhat silly isNumber check.
2011-07-12 15:22:39 -04:00
Jeremy Ashkenas
0b52dfbbef
Merge pull request #233 from chaoflow/master
...
make toArray return a clone in case of an array
2011-07-06 13:35:54 -07:00
Florian Friesdorf
9ab3ac44bb
move underscore test into a div
...
more comfortable to include underscore with tests in some other project.
2011-06-25 09:09:55 +02:00
Florian Friesdorf
0202f9f79b
make toArray return a clone in case of an array
...
In combination with backbone this makes coll.toArray() return an array
instead of just returning coll.models, enabling
coll.remove(coll.toArray()) whithout failing half way through.
2011-06-21 18:31:40 +02:00
Jeremy Ashkenas
96dbdaf929
Merge pull request #228 from DmitryBaranovskiy/master
...
Fixed isEqual and added isObject
2011-06-20 15:50:54 -07:00
Jeremy Ashkenas
dd31d36ec2
Merge pull request #232 from CatChen/master
...
Use setTimeout to verify _.delay's behavior in unit test
2011-06-20 15:43:22 -07:00
Cat Chen
b949d0345f
updated _.delay test to use setTimeout to verify _.delay's behavior
2011-06-20 22:30:35 +08:00
Dmitry Baranovskiy
42487bf47d
Fixed isEqual if second object has isEqual implemented and added isObject method
2011-06-07 09:48:34 +10:00
Jeremy Ashkenas
cf6cc16f43
Issue #207 -- add Data.js to the docs.
2011-05-13 17:09:15 -04:00
Jeremy Ashkenas
bf6098f986
closure-compiler comment, plus semicolons.
2011-05-11 13:08:59 -04:00
Jeremy Ashkenas
379d177a7e
Merge pull request #203 from ded/latest
...
set "_" extern for use with Closure Compilers ADVANCED_OPTIMIZATIONS
2011-05-11 10:06:45 -07:00
Jeremy Ashkenas
1331d814f9
re-adding underscore-min.js to master
2011-05-11 11:02:51 -04:00
Jeremy Ashkenas
910af6797f
Fixing #185
2011-05-11 11:00:15 -04:00
Jeremy Ashkenas
7bc1c9fb0d
Merge pull request #192 from dannytatom/docs-typo
...
Should be 'A convenient,' not 'An convenient'
2011-05-11 07:42:47 -07:00
Jeremy Ashkenas
057da5bc82
Issue #202 ... fallback method for sparse arrays.
2011-05-11 10:27:52 -04:00
Dustin Diaz
72c5558471
set "_" extern for use with Closure Compilers ADVANCED_OPTIMIZATIONS
2011-05-10 23:09:26 -07:00
Jeremy Ashkenas
5951d354af
Merge pull request #198 from shinuza/underscore.groupBytest
...
groupBy tests may fail in some cases.
2011-05-08 19:41:07 -07:00
shinuza
899000c217
Hashmap keys are not necessarily ordered. groupBy test may fail if the
...
expected order is not correct.
Fixing this by checking if the keys are present in the hash so
the order is not deterministic.
2011-05-07 12:03:02 +02:00
Jeremy Ashkenas
961f554767
Merge pull request #195 from ascheink/master
...
Added _.groupBy
2011-05-05 11:45:28 -07:00
Andrei
1681d25063
in groupBy, also pass index to iterator.
2011-05-05 14:43:28 -04:00
Andrei
b75e48c057
cleaned up key check in groupBy
2011-05-05 14:31:40 -04:00
Andrei
f8a4b78a86
Adding groupBy.
2011-05-05 14:00:40 -04:00
Danny Tatom
efa717b09e
Should be 'A convenient,' not 'An convenient'
2011-05-03 17:29:21 -07:00
Jeremy Ashkenas
c174663ea3
fixing docs for 'all'
2011-04-24 11:41:31 -04:00
Jeremy Ashkenas
b617615819
Underscore.js 1.1.6
2011-04-18 09:08:52 -04:00
Jeremy Ashkenas
13d4e626a8
removing obsolete _.after test.
2011-04-15 18:02:51 -04:00
Jeremy Ashkenas
6f25ccae31
michaelficarra's proposed tweak to _.after
2011-04-15 18:01:53 -04:00
Jeremy Ashkenas
ea44179d81
Issue #123 . _.extend shouldn't copy keys for undefined values.
2011-04-15 17:46:16 -04:00
Jeremy Ashkenas
bf214d2c8d
stricter ECMA5 compliance. _.every now requires an iterator to be passed. #160
2011-04-15 17:17:54 -04:00
Jeremy Ashkenas
3df562f07e
tweaking invoke implementation
2011-04-15 17:00:37 -04:00
Jeremy Ashkenas
8f67aa3f18
_.barrier -> _.after, switch the order of arguments ... fix test formatting.
2011-04-15 16:17:58 -04:00
Jeremy Ashkenas
c7b47edd2f
merging in barrier ... soon to be after
2011-04-15 16:13:51 -04:00