Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: jashkenas/underscore
base: 1.3.3
...
head fork: jashkenas/underscore
compare: 1.4.0
Commits on Apr 18, 2012
Jeremy Ashkenas Fixes #522 -- document the arguments to the iterator in reduce 74f4545
Jeremy Ashkenas Fixes #554 -- documents arguments to defer bc8266d
Brad Dunbar braddunbar Fix #556 - interpolate coerces null/undefined to ''. b24be55
Jeremy Ashkenas Merge pull request #560 from braddunbar/interpolate-null
Fix #556 - interpolate coerces null/undefined to ''.
67706cf
Commits on Apr 19, 2012
Colin T.A. Gray colinta more tests, and using __t trick in `_.escape` 4c4203d
Kevin Locke kevinoid Tighten specification for _.sortedIndex
sortedIndex should specify that it returns the lowest index at which an
item may be inserted to maintain sorted order, rather than any index
which satisfies this property, in order to provide easier use
maintaining a sorted list of unique elements.

For example, with the previous specification, the following behavior is
possible:

_.sortedIndex([10, 20, 30, 40], 30)
=> 3

To accommodate this behavior users would have to check both array[si]
and array[si-1] (when si > 0) before inserting to ensure uniqueness, or
to examine the underscore.js implementation and rely on the
implementation not changing.

Note:  This specification change does not require any changes to the
code.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
06c773b
Kevin Locke kevinoid Add test for tightened sortedIndex specification
Test that the lowest index, rather than any index, at which the element
should be inserted to maintain sorted order is returned.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
1aaeb41
Jeremy Ashkenas Merge pull request #562 from colinta/master
One last addition...
f10180b
Jeremy Ashkenas Merge pull request #563 from kevinoid/sorted-index-spec
Tighten specification for _.sortedIndex
96b9a8d
Jeremy Ashkenas comments and style tweaks 7d29339
Jeremy Ashkenas Merge branch 'master' of github.com:documentcloud/underscore 6ba2c5d
Commits on Apr 21, 2012
Bjørn Mæland bmaland Add _.exclude(object, *keys)
Return a copy of the object, filtered to exclude the blacklisted keys (or array
of valid keys).

Similar to _.pick, but using blacklisting instead of whitelisting which can be
more appropriate in some cases.
5316b3a
Commits on Apr 22, 2012
Rory O’Kane roryokane in sortedIndex test, rename variables to prevent confusion
I was confused when I read the second part of the test. The variable name was index2, and "30 should be inserted at index 2". But then I looked a few lines up, and saw that index's number "should be inserted at index 3". I had thought that the '2' at the end of 'index2' meant something it didn't. This renaming prevents that confusion.

This change highlights the repetition in this test. It is possible that a good next step would be to refactor the testing of these two numbers into an each loop. Or perhaps that would make the test unnecessarily complicated. I am not confident enough to make that call, so I'll leave it as it is.
2b92a45
Commits on Apr 23, 2012
Kyle Robinson Young shama typo fixes 320b67a
Brad Dunbar braddunbar Merge pull request #567 from shama/patch-typo
A few typo fixes
810dd30
Jeremy Ashkenas Merge pull request #566 from roryokane/patch-1
in sortedIndex test, rename variables to prevent confusion
e1fc1d3
Commits on Apr 26, 2012
Nick Fisher spadgos The 'needle' value is cached in sortedIndex ca0f211
Brad Dunbar braddunbar Merge pull request #571 from spadgos/sorted-index-caching
Cache iterator(obj) in sortedIndex
2524e51
Brad Dunbar braddunbar Use a separate variable for the iterator result value. e3fa7a6
Commits on Apr 27, 2012
Mark Hansen mhansen A linear algorithm for _.flatten.
Massive speedups on _.flatten for large, deep arrays.
8a1b309
Commits on Apr 28, 2012
pepkin88 pepkin88 Adding ", [context]" to the definition of `_.times()`. d55cb4b
Brad Dunbar braddunbar Merge pull request #574 from pepkin88/patch-2
Adding ", [context]" to the definition of `_.times()`.
c9ab76e
Commits on Apr 29, 2012
Jez Ng int3 Make _.throttle reentrant. 6e5d5b8
Commits on Apr 30, 2012
Jez Ng int3 Make immediate-debounce reentrant. e74241b
Jeremy Ashkenas Merge pull request #576 from int3/throttle
Make throttle reentrant
d277aaf
Jeremy Ashkenas Merge pull request #573 from mhansen/master
A linear algorithm for _.flatten.
78a9e48
Jeremy Ashkenas edited implementation of _.flatten e813db6
Commits on May 01, 2012
Genadi Samokovarov gsamokovarov Small whitespace cleanup for _.times and an anonymous function defini…
…tion.
43f03d1
Jeremy Ashkenas Merge pull request #582 from gsamokovarov/patch-1
Whitespace cleanup for _.times and an anonymous function definition
5e8b83c
Commits on May 04, 2012
Brad Dunbar braddunbar Style change, remove unnecessary semicolon. 9bc5078
Jeremy Ashkenas Merge pull request #588 from braddunbar/template-style
Style change, remove unnecessary semicolon.
60288c0
Commits on May 05, 2012
Brad Dunbar braddunbar Update QUnit. 5831005
Jeremy Ashkenas Merge pull request #590 from braddunbar/qunit
Update QUnit.
c43d30f
Commits on May 09, 2012
Jeremy Ashkenas Fixes #578 -- allow max() and min() to be called on very large arrays…
…, and still be optimized on smaller ones.
a7215f0
Jeremy Ashkenas Merge branch 'master' of github.com:documentcloud/underscore c22db85
Commits on May 10, 2012
Jeremy Ashkenas adding a rel=canonical 4b0b3a5
Commits on May 14, 2012
Jeremy Ashkenas adding docs about isObject a4414ce
Commits on May 21, 2012
Harry Wolff hswolff Implement mobile-site for underscore 80532fd
Commits on May 22, 2012
Jeremy Ashkenas Merge pull request #610 from hswolff/mobile-site
Implement mobile-site for underscore
6c68465
Jeremy Ashkenas initial draft of removing sparse array workarounds. 4e4bc19
Jeremy Ashkenas space removal typo. 74f86a6
Jeremy Ashkenas removing over-indentation. 658f921
Jeremy Ashkenas removing longstanding broken test. 5b515ef
Jeremy Ashkenas alignment and variable name f6a6aca
Jeremy Ashkenas breaking out the HTML escaping regex for a single pass. fceac7a
Jeremy Ashkenas elaborating comment. b3a5632
Jeremy Ashkenas removing the deprecated 'intersect' name for _.intersection dc1a2b0
Commits on May 23, 2012
Jeremy Ashkenas removing broken noConflict test 70d54d0
Jeremy Ashkenas Fixes #603. Adds an _.zipObject() function. f66f20b
Jeremy Ashkenas removing old AMD-removal warning. 1ece112
Jeremy Ashkenas adding a warning about (lack of) sparse array support 36bb762
Jeremy Ashkenas removing needless isSorted optimization. 47e7dbb
Jeremy Ashkenas adding parens for clarity 94f10d8
Jeremy Ashkenas hoisting out the flatten function. 0da7b39
Commits on May 24, 2012
Jeremy Ashkenas Fixes #613: Adding a link to the chinese version of the docs. 4ebb87c
Jeremy Ashkenas elongating a single-line if. 7ef6b6d
Commits on May 25, 2012
Michael Ficarra michaelficarra Add tests for `_.find`. e162a68
Commits on May 26, 2012
Michael Ficarra michaelficarra corrections to tests for `_.find` as requested by @braddunbar 6eb19ac
Brad Dunbar braddunbar Merge pull request #617 from michaelficarra/patch-3
Add tests for `_.find`.
99d1023
Brad Dunbar braddunbar Remove unnecessary code as per #618. 03a8b0b
Brad Dunbar braddunbar Merge pull request #619 from braddunbar/invoke
Remove unnecessary code as per #618.
7229edc
Commits on May 31, 2012
Robert Böhnke robb Adding a link to Underscore.m in the docs
It's an Objective-C port of Underscore.js
b919103
Commits on Jun 08, 2012
Jeremy Ashkenas Fixes #633 -- allow _.shuffle to work on Objects as well as Arrays 6b196fd
Jeremy Ashkenas Merge branch 'master' of github.com:documentcloud/underscore 89fa3e6
Jeremy Ashkenas Merge pull request #623 from robb/master
Add a link to Underscore.m in docs
23b35a2
Commits on Jun 10, 2012
Jeremy Ashkenas removing extra parameters from callback. 91a841a
Commits on Jun 14, 2012
Brad Dunbar braddunbar Fix #642 - Update jQuery. 6ab42d2
Brad Dunbar braddunbar Update references to deprecated `_.intersect`. dc624f4
Commits on Jun 15, 2012
Brad Dunbar braddunbar QUnit 1.8.0 322a641
Commits on Jun 20, 2012
Russ russplaysguitar Added info and links to Underscore.cfc to docs 7c63003
Commits on Jun 21, 2012
Brett Goulder brettgoulder Just do the media query for the iPhone 4 f066c79
Jeremy Ashkenas Merge pull request #647 from brettgoulder/master
Just do the media query on the docs for the iPhone 4, not retina macbook pro
d586d9c
Jeremy Ashkenas Merge pull request #646 from russplaysguitar/master
Added Underscore.cfc info to docs
64b8f86
Commits on Jun 26, 2012
Mike Sidorov Simplify some isType methods declaration d76acef
Jeremy Ashkenas Merge pull request #654 from FarSeeing/master
Simplify some isType methods declaration
a642f78
Commits on Jun 28, 2012
Leonard Martin lennym Added default every/all iterator as _.identity for consistency with a…
…ny/some
84fc2ec
Brad Dunbar braddunbar Reference underscorejs.org in the README. bde1eea
Commits on Jul 12, 2012
Brad Dunbar braddunbar Fix #670 - Use `value` rather than `variable`. c8178e5
Jeremy Ashkenas Merge pull request #671 from braddunbar/isundefined
Fix #670 - Use `value` rather than `variable`.
155185b
Commits on Jul 18, 2012
Jeremy Ashkenas Adding an _.countBy. 53c67e7
Jeremy Ashkenas Merge branch 'master' of github.com:documentcloud/underscore f6f9d37
Commits on Aug 03, 2012
Jeremy Ashkenas adding underscore objective-c ports 2eb8d2d
Commits on Aug 07, 2012
Anton Khlynovskiy subzey Unreference wrapped function in _.once
Assuming we'll never run the wrapped function again on _.once(), we can
assign null to the `func` variable, so function (and all its inherited
scopes) may be collected by GC if needed.
ac7f640
Commits on Aug 13, 2012
Tim Walling update doc to reflect that times passes index to iterator 4f66975
Jeremy Ashkenas Merge pull request #701 from twalling/master
update doc to reflect that times passes index to iterator
2c7cb73
Commits on Aug 15, 2012
Jeremy Ashkenas clearer 'variable' example for _.template, plus passive voice exorcism. 3032ea2
Jeremy Ashkenas Merge branch 'master' of github.com:documentcloud/underscore f2cca69
Commits on Aug 18, 2012
Brad Dunbar braddunbar Tweak _.toArray.
* Combine _.isArray and _.isArguments type checks.
* _.isFunction will suffice for obj.toArray.
ca0df90
Brad Dunbar braddunbar Document `take` alias. 78652c6
Commits on Aug 20, 2012
Jeremy Ashkenas Merge pull request #707 from braddunbar/take
Document `take` alias.
4098a13
Jeremy Ashkenas Merge pull request #706 from braddunbar/toarray
Tweak _.toArray.
460adf5
Commits on Aug 24, 2012
Brad Dunbar braddunbar Merge #565 from @bmaland. 272f4c6
Brad Dunbar braddunbar Rename _.exclude as _.omit and tweak a bit. 98b548d
Brad Dunbar braddunbar Fix #715 - `omit` includes prototype properties. f603a3d
Jeremy Ashkenas Merge pull request #716 from braddunbar/omit-proto-props
Fix #715 - `omit` includes prototype properties.
93594c3
Jeremy Ashkenas Fixes #717 -- refactor pick and omit... b73b025
Commits on Aug 25, 2012
Brad Dunbar braddunbar _.omit uses _.include instead of delete. 625ebe1
Brad Dunbar braddunbar Merge pull request #719 from braddunbar/omit-include
_.omit uses _.include instead of delete.
aaf40f1
Commits on Aug 27, 2012
HIGASHI Taiju taiju added "drop" alias for "rest" 8912960
Commits on Aug 30, 2012
Jeremy Ashkenas Adding an _.pairs function. 3ee2fb1
Jeremy Ashkenas Merge branch 'master' of github.com:documentcloud/underscore 399d8a0
Jeremy Ashkenas Changed _.zipObject to _.object, now able to handle both key and valu…
…e lists, as well as a list of tuples. Works as the inverse of _.pairs
73a1893
Jeremy Ashkenas Merge pull request #720 from taiju/add-alias-drop
added "drop" alias for "rest"
371e02a
Jeremy Ashkenas Fixes #653, _.size(arguments) a087797
Jeremy Ashkenas Merge branch 'master' of github.com:documentcloud/underscore 881e529
Jeremy Ashkenas Fixes #702 -- allow _.escape to return empty strings for null and und…
…efined
a4c01a6
Jeremy Ashkenas test for previous commit 811794f
Jeremy Ashkenas Fixes #700 -- in reverse. talk less about strict equality. f654312
Jeremy Ashkenas removing old temp-tests file 411f434
Jeremy Ashkenas Fixes #698 (not really) -- adds a test for arrays of undefined. 1118772
Brad Dunbar braddunbar Document `drop` alias. 879acb4
Jeremy Ashkenas Merge pull request #726 from braddunbar/drop-alias
Document `drop` alias.
310d152
Jeremy Ashkenas Merge pull request #693 from subzey/master
Unreference wrapped function in _.once
8a95eb4
Jeremy Ashkenas Fixes #689 -- adding an _.random 9642623
Commits on Aug 31, 2012
Michael Aufreiter Fixed link to Data.js. 575304f
Brad Dunbar braddunbar Merge pull request #727 from michael/prose-patch
Fixed link to Data.js.
4996f51
Brad Dunbar braddunbar Tweak whitespace. a76eb37
Jeremy Ashkenas correcting implementaion of _.random c2cef3d
Jeremy Ashkenas Fixes #676 -- adds an _.unescape as the inverse of _.escape ... and a…
…lso adds an _.invert for inverting objects.
4dd33e3
Jeremy Ashkenas Fixes #666: Adds a 'template' property to the error, whenever you hav…
…e a SyntaxError in a _.template
4e6b147
Jeremy Ashkenas removing old temp.js file a4a2e03
Jeremy Ashkenas adding a test for #666 b24a1c2
Jeremy Ashkenas Revert "adding a test for #666"
This reverts commit b24a1c2.
fd801af
Jeremy Ashkenas Revert "Fixes #666: Adds a 'template' property to the error, whenever…
… you have a SyntaxError in a _.template"

This reverts commit 4e6b147.
be778eb
Jeremy Ashkenas Fixes #666: adds generated source to syntaxerrors of templates 2b1d7bd
Jeremy Ashkenas Merge pull request #661 from lennym/patch-1
Added default every/all iterator as _.identity for consistency with any/some
50d4959
Jeremy Ashkenas Fixes #650 -- have size simply use a numeric length property, if one …
…is available.
866d244
Jeremy Ashkenas Fixes #635: document that _.times passes the iteration count 2ebe669
Commits on Sep 02, 2012
Brad Dunbar braddunbar Upgrade QUnit. f25cfc4
Brad Dunbar braddunbar test/{test.html -> index.html} 3a4fc1e
Brad Dunbar braddunbar Fix #746 - template settings are not modified. b1eae9a
Brad Dunbar braddunbar Fix #750 - Refactor wrapper. 6587a30
Commits on Sep 04, 2012
Jeremy Ashkenas Merge pull request #754 from braddunbar/template-settings
Fix #746 - template settings are not modified.
957f914
Jeremy Ashkenas Merge pull request #752 from braddunbar/test-index
test/{test.html -> index.html}
2274479
Jeremy Ashkenas Merge pull request #751 from braddunbar/wrapper-refactor
Fix #750 - Refactor wrapper.
cdbeeef
Commits on Sep 05, 2012
Brad Dunbar braddunbar Drop doubled test prefixes. 50efe43
Jeremy Ashkenas Merge pull request #759 from braddunbar/test-prefix
Drop doubled test prefixes.
664e93e
Commits on Sep 06, 2012
Albert Sun albertsun Improvement for #465 -- update the return value from throttle when ca…
…lled repeatedly
928c0f3
Jeremy Ashkenas Merge pull request #762 from albertsun/master
Update the return value of a throttled function
b006769
Commits on Sep 10, 2012
Jeremy Ashkenas Fixes #767 -- comparison of circular reference with non-circular refe…
…rence
3b02326
Commits on Sep 11, 2012
Jeremy Ashkenas Changing Underscore's _.each semantics to whitelist for arrays and ar…
…guments, instead of a numeric length propery.
63053db
Commits on Sep 12, 2012
Jeremy Ashkenas Tweaking / cleaning implementation of _.uniq. 8f8e988
Jeremy Ashkenas Fixes #764 -- Removing extra sparse array checks from the heart of is…
…Equal
22af08a
Jeremy Ashkenas Fixes #760 -- clarify chaining docs b6375d7
Jeremy Ashkenas Fixes #769 -- update function count. 12d493e
Jeremy Ashkenas Fixes #757 -- move sortedIndex to Arrays category 1ee60e4
Jeremy Ashkenas Fixes #755 -- be more consistent in internal use of _.flatten over pr…
…ivate recursive flatten function.
8c36591
Jeremy Ashkenas Fixes #755 -- use concat.apply for shallow flattening internally. 4880a43
Jeremy Ashkenas Fixes #749 -- isNaN returns true for wrapped NaN objects. 6ebb43f
Jeremy Ashkenas Fixes #748 -- removes support for custom isEqual semantics within _.i…
…sEqual
f97783b
Jeremy Ashkenas Fixes #770 -- allow _.size to continue to repsect numeric 'length' ..…
…. mainly for the benefit of jQuery array-likes.
78cc9f3
Jeremy Ashkenas Fixes #770 -- reverts each array-like semantics change. d4ebe55
Commits on Sep 14, 2012
Ryan Van Etten ryanve optimize _.mixin and _.wrap ef48bd6
Brad Dunbar braddunbar Merge pull request #774 from ryanve/master
optimize _.mixin and _.wrap
615ed8c
Jeremy Ashkenas Adding an 'Edge Version' link to the homepage 68ce78a
Jeremy Ashkenas Merge branch 'master' of github.com:documentcloud/underscore 2339573
Jeremy Ashkenas Fixes #771 -- removes custom toArray support and adds array-like supp…
…ort.
c551884
Jeremy Ashkenas Fixes #740 -- debounced functions now return their last updated value cb8aff2
Jeremy Ashkenas Fixes #738 -- makes sortBy a stable sort. aea79c1
Commits on Sep 17, 2012
Jeremy Ashkenas revising #738 -- implementation of stable sortBy a8087f0
Jeremy Ashkenas trying out the new CONTRIBUTING feature d09457f
Jeremy Ashkenas tweaks to CONTRIBUTING 233b8db
Commits on Sep 18, 2012
Brad Dunbar braddunbar Clean up groupBy/countBy/sortBy.
* Remove superfluous argument to `lookupIterator`.
* Add context argument to `groupBy`, `countBy`.
* Streamline `sortBy`.
0a00bd3
Jeremy Ashkenas Merge pull request #780 from braddunbar/cleanup
Clean up groupBy/countBy/sortBy.
7eca0da
Jeremy Ashkenas Fixes #648 -- adds to Underscore. 5fd4f4e
Jeremy Ashkenas Merge branch 'master' of github.com:documentcloud/underscore 7f8161e
Jeremy Ashkenas Fixes #689 -- allow _.random() to be called with just a max, and use …
…it in _.shuffle
b18f4da
Jeremy Ashkenas Fixes #725 -- wording in the documentation of sortedIndex. 1f90ca2
Commits on Sep 19, 2012
Brad Dunbar braddunbar Fix #779 - Delimiters are used without escaping. bb4ec45
Brad Dunbar braddunbar Use `slice` instead of non-standard `substr`. ed83596
Jeremy Ashkenas Merge pull request #782 from braddunbar/delimiters
Fix #779 - Delimiters are used without escaping.
9fc81c9
Jeremy Ashkenas Fixes #729 -- reduceRight passes correct arguments for non-arrays. d7fdfa7
Jeremy Ashkenas Fixes #733 -- quick-fix implementation of isEqual on naked objects fr…
…om different frames.
4efca3e
Jeremy Ashkenas #729 -- implementing reduceRight for object iteration e769848
Commits on Sep 20, 2012
Jeremy Ashkenas Fixes #783 -- implement reduceRight with an internal flag. 24a58fe
Jeremy Ashkenas optimizing toFunction 64c45f1
Brad Dunbar braddunbar Reverse isFunction check. 680c46b
Jeremy Ashkenas Fixes #743 -- avoid treating object functions like collection functions. cf0de25
Jeremy Ashkenas Fixes #772 -- elevate the official underscore method as 'contains' in…
…stead of 'include'
367422b
Jeremy Ashkenas Prefer _.contains to _.include internally. 684fd56
Jeremy Ashkenas Fixes #756 -- switch to uglifier (passes tests) c8142f5
Jeremy Ashkenas Revert "Fixes #756 -- switch to uglifier (passes tests)"
This reverts commit c8142f5.
7943cd1
Jeremy Ashkenas Revert "Revert "Fixes #756 -- switch to uglifier (passes tests)""
This reverts commit 7943cd1.
b83b68e
Jeremy Ashkenas Fixes #734 -- meaningless hypothetical non-tweak to isElement ;) ab31329
Jeremy Ashkenas #735 -- allows sortedIndex to work on extremely large arrays. e852e01
Jeremy Ashkenas Fixes #737 -- adds fromIndex to _.indexOf and _.lastIndexOf c66c71c
Jeremy Ashkenas Fixes #736 -- allow groupBy and countBy to work with dynamic keys tha…
…t are the same as Object.prototype properties.
b311e7c
Jeremy Ashkenas Fixes #739 -- uniq and sortedIndex now accept contexts to go along wi…
…th their iterators.
a1cb658
Commits on Sep 21, 2012
James Campos aeosynth chmod -x favicon 391bccd
Jeremy Ashkenas Merge pull request #791 from aeosynth/master
chmod -x favicon
950a295
Jeremy Ashkenas #783 -- adjusted reduceRight implementation. 5097178
Jeremy Ashkenas Merge branch 'master' of github.com:documentcloud/underscore 12495cf
Commits on Sep 24, 2012
Brad Dunbar braddunbar _.sortedIndex takes a string as an iterator. 7c0a45f
Brad Dunbar braddunbar Fix #792 - Correct docs for _.defaults. 6eec024
Commits on Sep 26, 2012
Jeremy Ashkenas Merge pull request #797 from braddunbar/defaults
Fix #792 - Correct docs for _.defaults.
64ffea3
Jeremy Ashkenas Merge pull request #796 from braddunbar/sorted-index-iterator
_.sortedIndex takes a string as an iterator.
f032e78
Commits on Sep 27, 2012
Brad Dunbar braddunbar Fix #798 - Pass collection to groupBy/countBy iterator. a1ea2fb
Jeremy Ashkenas Merge pull request #800 from braddunbar/iterator-args
Fix #798 - Pass collection to groupBy/countBy iterator.
7a0338a
Jeremy Ashkenas Fixes #744, reverts #80. Removes special null handling from collectio…
…n and array functions.
ac6beae
Jeremy Ashkenas Underscore.js 1.4.0 37609e8