7685 Commits

Author SHA1 Message Date
Jeremy Ashkenas
974ae99e87 Merge branch 'fix_reduce_initial_value' of http://github.com/mcmire/underscore 2010-11-01 08:30:53 -04:00
Jeremy Ashkenas
c595974771 Merge branch 'gh-pages' of http://github.com/bkudria/underscore 2010-11-01 08:28:21 -04:00
Elliot Winkler
f729769d85 Fix reduceRight() so that if you don't pass in an initial value, the last item in the collection is used 2010-10-31 19:03:52 -06:00
Elliot Winkler
c21e7b24c6 Fix reduce() so that if you don't pass in an initial value, the first item in the collection is used 2010-10-31 18:51:30 -06:00
Benjamin Kudria
339ae67c01 Fix (grammar) typo. 2010-10-29 14:56:25 -07:00
Jeremy Ashkenas
31efd854f8 removing now unused propertyIsEnumerable reference. 2010-10-18 20:45:18 -04:00
Jeremy Ashkenas
8fe19f2023 Underscore 1.1.2 2010-10-15 17:21:41 -04:00
Jeremy Ashkenas
8aeb2832eb Merge branch 'master' of http://github.com/ryantenney/underscore 2010-10-15 17:16:26 -04:00
Jeremy Ashkenas
74d282ccc8 fixing mistakenly-aliased contains ... should refer to include. 2010-10-15 17:15:26 -04:00
Ryan W Tenney
c994dec4c0 adding alias 'unique' to point to 'uniq' 2010-10-10 21:38:46 -04:00
Jeremy Ashkenas
b07c802766 tweaking documentation, license mention 2010-10-07 10:49:10 -04:00
Jeremy Ashkenas
5b4b308c91 Fixing template settings 2010-10-07 10:44:49 -04:00
Jeremy Ashkenas
0fb9a95182 Merging in Ryan Tenney's 'improuvements' 2010-10-06 10:55:19 -04:00
Ryan W Tenney
18e85b813f slice(0) is interchangable with slice() (in method clone) 2010-10-05 22:47:55 -04:00
Ryan W Tenney
4d901fbc3c Adding minified version. 2010-10-05 22:44:07 -04:00
Ryan W Tenney
1c6e01173a "Cleaned up"? _.range (or maybe not) 2010-10-05 22:36:15 -04:00
Ryan W Tenney
81ce3ee0bd Updated templateSettings regexes in tests, replacing the . with [\s\S] 2010-10-05 22:34:24 -04:00
Ryan W Tenney
2de76e065e Escaped lts, gts and amps in the test case descriptions. 2010-10-05 22:33:16 -04:00
Ryan W Tenney
2dc203332b Changed reduceRight to avoid unnecessarily cloning an array.
`toArray` returns the first argument unmodified if it passes `isArray`.
So if `obj` passes `isArray`, call `slice` on it directly, otherwise use `toArray`.
2010-10-05 21:22:37 -04:00
Ryan W Tenney
2aec074aca Define aliases inline. 2010-10-05 21:10:14 -04:00
Ryan W Tenney
644c5aa2ce Expose wrapper.prototype as _.prototype 2010-10-05 20:32:57 -04:00
Ryan W Tenney
4484002f7e escapeRegExp is no longer used. 2010-10-05 20:30:57 -04:00
Ryan W Tenney
cd7c9ee964 Simplify _.clone a little bit. 2010-10-05 20:28:23 -04:00
Jeremy Ashkenas
faa672ecd9 Underscore 1.1.1 2010-10-05 17:52:36 -04:00
Jeremy Ashkenas
a80550ccd2 Tweaks to the Annotated Underscore. 2010-10-05 17:41:11 -04:00
Jeremy Ashkenas
348147d8fb better default multiline-aware templates 2010-10-05 17:10:44 -04:00
Jeremy Ashkenas
5984be70c1 adding m flag to default templateSettings regexes. 2010-10-05 17:05:03 -04:00
Jeremy Ashkenas
7b25bbef4f Merge branch 'improuvements' of http://github.com/ryantenney/underscore 2010-10-05 16:57:56 -04:00
Jeremy Ashkenas
17e21da715 adding a doc task 2010-10-05 16:57:39 -04:00
Jeremy Ashkenas
3f49d1df30 Tweaking Underscore for docco-mentation. 2010-10-05 16:44:56 -04:00
Ryan W Tenney
79600d6e9c Use slice.call internally when working with arguments instead of _.toArray or _.rest 2010-10-03 16:34:38 -04:00
Jeremy Ashkenas
3ce6f9a93b Merge branch 'ultra-mega-important-fix' of http://github.com/maw/underscore 2010-09-28 09:55:02 -04:00
Ryan W Tenney
3505f79566 Replaced .split("'").join("\\'") with .replace(/'/g, "\\'"). http://jsperf.com/split-join-vs-replace 2010-09-27 21:55:49 -04:00
Jeremy Ashkenas
fbd682d9ec Fixing Issue #35. newlines in evaluated code. 2010-09-27 17:35:43 -04:00
Jeremy Ashkenas
902f1192e0 fixing test that tried to load nonexistent images in a template. 2010-09-27 15:45:08 -04:00
Samuel Clay
4c35fc80dc Cleaning up testcase's variable names for readability. 2010-09-23 12:37:42 -04:00
Samuel Clay
2068f0819d Fixing _.template() bug where using 'p' as a variable name would override the variable by the same name in _.template(), causing an error. See test case utilities.namespaceCollisionTemplate() for example of broken case. 2010-09-23 12:35:25 -04:00
Michael Wolf
83c7a006cb fix tyop 2010-09-09 18:20:08 -05:00
Jeremy Ashkenas
cd93790282 Adding Ryan to the contributor list. 2010-09-03 08:41:58 -04:00
Ryan W Tenney
7df67bcc4d Revert change of new Array(len) to []. 2010-09-01 16:18:22 -04:00
Ryan W Tenney
19acc63374 Improuvements: removed calls to String(…) (speed), construction of arrays like new Array(len) (standards), replaced arr.push(val) with arr[arr.length] = val (speed). 2010-08-31 17:02:32 -04:00
Ryan W Tenney
116ff91bec Guarantee boolean return value from _.isArguments 2010-08-31 14:53:12 -04:00
Samuel Clay
3588d11adc Fixing broken link, adding explanation of _.map's iterator's arguments, and adding extra examples to _.map and _.each. 2010-08-31 12:26:23 -04:00
Jeremy Ashkenas
7a4ddca64d Revert "slight speedup to _.template"
This reverts commit 7973d7263c.
2010-08-26 02:01:24 -04:00
Jeremy Ashkenas
7973d7263c slight speedup to _.template 2010-08-26 01:02:09 -04:00
Jeremy Ashkenas
fc90d57e36 Underscore.js 1.1.0 2010-08-18 09:26:36 -04:00
Jeremy Ashkenas
b2b5a5390b merging a variant of svieira's fix for preserving whitespace within templates. 2010-07-20 13:37:27 -04:00
Jeremy Ashkenas
ef396a9e13 Aliasing _.contains to _.include 2010-07-15 10:18:11 -04:00
Jeremy Ashkenas
9827f87611 (breaking change) moving _.reduce's method signature to that of ECMA5. _.reduce(obj, iterator, memo). Updated tests and docs. 2010-07-15 09:50:55 -04:00
Nick Stenning
e81a2ec516 Allow _.template functions to be called with no arguments.
This change simply allows templates to be called with no arguments, for a behaviour equivalent to being called with an empty object, {}.
2010-07-14 11:09:05 +01:00