Jeremy Ashkenas
7fc616943e
Issue #329 , special check for the common and magical 'length' property.
2011-10-18 23:26:59 -04:00
Jeremy Ashkenas
e79586515c
Issue #329 -- significant change to _.isEqual semantics.
2011-10-18 16:07:23 -04:00
Kevin Malakoff
f2a64227fd
Reimplemented _.isEqual tests and patch in a fresh branch.
2011-10-06 15:50:51 +02:00
Jeremy Ashkenas
7d0e4169a9
shortening module names.
2011-10-04 15:56:32 -04:00
Kit Cambridge
7760e6aa52
Merge git://github.com/documentcloud/underscore into isequal
2011-09-05 17:50:45 -06:00
Kit Cambridge
4fa97eb2fa
_.isBoolean should return true for boolean object wrappers.
2011-09-05 15:51:09 -06:00
Kit Cambridge
e9faa40108
Add a comprehensive test suite for isEqual.
2011-09-05 12:27:03 -06: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
Jeremy Ashkenas
cd236d4c47
Issue #243 . _.functions now also returns the names of function defined in the prototype chain.
2011-07-13 11:09:51 -04: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
5c2c3ce464
Rewrite _.isEqual and add support for comparing cyclic structures.
2011-07-12 19:42:36 -06: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
ea44179d81
Issue #123 . _.extend shouldn't copy keys for undefined values.
2011-04-15 17:46:16 -04:00
Jeremy Ashkenas
866cd35236
merging in michaelficarra's issue95
2011-03-20 18:50:56 -04:00
Jeremy Ashkenas
25457982a8
new version of qunit ... fixing up tests.
2011-03-20 18:21:49 -04:00
Kit Goncharov
48abcd84c5
Issue #149 : _.keys should throw a TypeError for non-objects.
2011-03-20 10:08:32 -06:00
Michael Ficarra
1f2c9c5fc1
added regression test for issue #95
2011-03-04 10:15:48 -05:00
Jeremy Ashkenas
226b7d9344
Adding _.defaults, Issue #106
2011-02-01 21:19:58 -05:00
Jason Davies
2120b27b22
Fix _.isEquals() for wrapped objects
...
This caught me out when writing some unit tests that use _.isEquals().
They were all passing even though I knew they shouldn't be, and I
realised I was checking equality with a wrapped object that I'd
forgotten to unwrap.
2010-12-03 13:01:58 +00:00
Jeremy Ashkenas
6b8bb0cacd
Better Underscore isType checking, in the presence of Internet Explorer host objects, which are a bit touchy.
2010-12-01 10:25:55 -05:00
Jeremy Ashkenas
9e3e067f50
Initial draft of _.throttle and _.debounce
2010-11-30 11:41:48 -05:00
Jeremy Ashkenas
8fe19f2023
Underscore 1.1.2
2010-10-15 17:21:41 -04:00
Jeremy Ashkenas
5b4b308c91
Fixing template settings
2010-10-07 10:44:49 -04:00
Jeremy Ashkenas
ef396a9e13
Aliasing _.contains to _.include
2010-07-15 10:18:11 -04:00
Jeremy Ashkenas
29e2c832bc
Underscore 1.0.4, with _.memoize
2010-06-22 09:21:03 -04:00
Ryan W Tenney
0e8ca3cb97
NaN is never equal to NaN. Fixed in underscore.js and underscore-min.js, updated tests in test/objects.js
2010-06-12 17:10:48 -04:00
Jeremy Ashkenas
79f65b440a
Even though it's not really part of the API, making _.isEmpty work with Strings cross-browser.
2010-04-06 13:01:45 -04:00
Jeremy Ashkenas
a6578068d2
Underscore 1.0.1 -- bugfix release for _.isEqual
2010-03-19 10:07:21 -04:00
Mike Frawley
4085b68be4
enhance #extend to allow taking multiple source objects.
...
This is done in jquery, extjs, and others as well.
added tests, no docs
2010-03-05 15:24:59 -05:00
Jeremy Ashkenas
9903905175
merging mrjjwright's isBoolean, with tests, docs, and credit
2010-02-27 00:03:36 -05:00
John Wright
bd271e4794
added _.isBoolean function
2010-02-26 21:46:58 -07:00
Jeremy Ashkenas
d855def438
adding an _.mixin utility function that allows you to add functions to Underscore (also used internally)
2010-02-24 13:44:46 -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
7824d63ce8
make the new faster isEmpty a little safer too
2010-02-24 12:43:57 -05:00
Mike Frawley
59d383c151
Revert "Create #alias method, callable on any object, _ by default."
...
This reverts commit c43de549ba .
Conflicts:
test/objects.js
2010-02-23 17:26:32 -06:00
Mike Frawley
5a5e14d7a4
add #times utility method.
...
_(3).times(alert)
added tests and internal docs
2010-02-17 10:21:59 -06:00
Mike Frawley
263b1ee92d
add #buildLookup method to turn collection in to a fast lookup hash
...
implement #without in terms of it
add tests and internal docs
2010-02-17 10:12:22 -06:00
Mike Frawley
130e860ecf
improve #isEmpty implementation. add 2 tests
2010-02-17 09:48:29 -06:00
Mike Frawley
c43de549ba
Create #alias method, callable on any object, _ by default.
...
While I'm not a fan of making abstractions where a simpe solution
exists, I think this is good as it makes a public API for extending
underscore, therefore making it "ok" to make your own alias names.
Also give us some future proofing in case we ever add in hooks on
method definition. For example, right now if you add a method
or make an alias in user code, it isn't added to the wrapper prototype.
Added tests and inline docs, no external docs
2010-02-17 09:41:18 -06:00
Jeremy Ashkenas
11e7af06e9
close that iframe document after writing to it
2010-02-08 07:12:40 -05:00
Jeremy Ashkenas
d01bb56833
adding type tests across iframes for all isType functions
2010-02-05 08:22:40 -05:00
Jeremy Ashkenas
7ec091cc55
safer isArguments function -- make sure we're not dealing with strings or functions
2010-01-20 12:45:32 -05:00
Jeremy Ashkenas
d49196f2e7
pulling Evgeniy Dolzhenko's patch to add _.tap, with tests
2009-12-11 09:25:20 -05:00
Jeremy Ashkenas
5c314d206e
adding an isArguments checker and enabling iteration (using each) over JS object hashes that have numeric length properties
2009-12-09 13:41:19 -05:00
Jeremy Ashkenas
2ba87d6b44
adding test case for previous commit
2009-12-09 11:20:09 -05:00
Jeremy Ashkenas
39001bd029
API changes: _.bindAll now takes the context object as the first parameter, instead of the last, and _.functions (_.methods) now takes an explicitreceiver, returning a list of its methods
2009-12-06 23:54:41 -05:00
Jeremy Ashkenas
06c74e76f0
added an isRegExp test
2009-12-06 23:10:44 -05:00