Commit Graph

592 Commits

Author SHA1 Message Date
brad dunbar
a2a35c10ce Merge pull request #512 from braddunbar/getvalue
Add utility function `result`.
2012-03-19 11:46:26 -07:00
Brad Dunbar
5545a3b68d Dispense with abbreviation. 2012-03-19 14:43:20 -04:00
Brad Dunbar
5c7ccb21ef Rename getValue to result. 2012-03-19 14:33:38 -04:00
Brad Dunbar
d0e7b397c1 Cache property value. 2012-03-19 14:24:59 -04:00
Jeremy Ashkenas
984f29ad58 Merge pull request #511 from braddunbar/tmpl-regexes
Clean up _.template.
2012-03-19 09:24:08 -07:00
Brad Dunbar
666049ac5d Add utility function getValue. 2012-03-17 13:02:17 -04:00
Brad Dunbar
f5eb4b0915 Clean up _.template.
* Cache regexes.
* Use object properties for lookup instead of switch.
2012-03-17 09:26:39 -04:00
Jeremy Ashkenas
ba3e31b53e Merge pull request #506 from braddunbar/line-terminators
Handle \u2028 & \u2029 in _.template.
2012-03-12 16:41:18 -07:00
Brad Dunbar
826e743262 Handle \u2028 & \u2029 in _.template. 2012-03-12 19:15:18 -04:00
Jeremy Ashkenas
144dcb1828 Merge pull request #505 from braddunbar/arbitrary-code
Allow natural multi-line code evaluation in templates.
2012-03-12 07:27:23 -07:00
Brad Dunbar
414fafb1f4 Allow natural multi-line code evaluation in templates.
By escaping `\r`, `\n`, and `\t` earlier, we can unescape
them along with backslashes and single quotes allowing
for the inclusion of single line comments and code without
a terminating semicolon.
2012-03-11 12:39:13 -04:00
Jeremy Ashkenas
34305bc85d Merge pull request #493 from mborejdo/master
added favicon
2012-02-27 08:31:45 -08:00
U-EM\mib
5677a0c6eb added favicon, closes #492 2012-02-27 17:26:26 +01:00
Jeremy Ashkenas
c99cfca75e Merge pull request #486 from kitcambridge/uniq
`_.uniq()` should work with sparse arrays.
2012-02-21 09:43:54 -08:00
Kit Cambridge
8808f7d531 Un-golf _.uniq(). 2012-02-21 10:35:55 -07:00
Kit Cambridge
0285f47f78 _.uniq(): Remove unused previous variable. 2012-02-20 12:36:48 -07:00
Kit Cambridge
c8d4025621 Issue #484: _.uniq() should work with sparse arrays. 2012-02-20 12:21:54 -07:00
Jeremy Ashkenas
23931b2716 Merge pull request #482 from dbrans/master
Test: any and every cast result to boolean. Relates to #478
2012-02-17 10:07:24 -08:00
Derek Brans
7c7c38decf Test: any and every cast result to boolean. Relates to #478 2012-02-17 11:40:47 -05:00
Jeremy Ashkenas
90431601cc Merge pull request #481 from dbrans/master
Fix for #478 - any and every should be consistent about casting result to boolean
2012-02-16 13:33:36 -08:00
Derek Brans
c2a58725be Fix for #478 - any and every should be consistent about casting result to boolean 2012-02-16 16:31:18 -05:00
Jeremy Ashkenas
bb63be5167 Merge pull request #463 from michaelficarra/patch-2
`_.difference` should perform a shallow flatten
2012-02-06 09:28:41 -08:00
Michael Ficarra
ff544ae997 _.difference should perform a shallow flatten 2012-02-06 12:24:13 -05:00
Jeremy Ashkenas
f4359d9684 Merge pull request #462 from joliss/doc
Make it clearer that extend and defaults modify in place *and* return
2012-02-06 06:56:11 -08:00
Jo Liss
64ed34f949 Make it clearer that extend and defaults modify in place *and* return 2012-02-06 14:14:50 +01:00
Jeremy Ashkenas
af4b86e0a6 making toArray example clearer. 2012-02-03 10:18:44 -05:00
Jeremy Ashkenas
5533c12033 Fixes #437 -- add an 'immediate' parameter to _.debounce. 2012-01-30 10:53:46 -05:00
Jeremy Ashkenas
1bb750508d Merge pull request #454 from braddunbar/qunit
Upgrade QUnit
2012-01-30 07:44:49 -08:00
Brad Dunbar
458e604eee upgrade qunit 2012-01-30 10:31:12 -05:00
Jeremy Ashkenas
59761cedcf Merge pull request #453 from braddunbar/isempty
Short Circuit `isEmpty` for null/undefined
2012-01-30 07:21:03 -08:00
Brad Dunbar
5c6abc4453 short circuit isEmpty for null/undefined 2012-01-30 10:15:04 -05:00
Jeremy Ashkenas
bdb3cb21f9 fixing isObject documentation. 2012-01-30 10:01:08 -05:00
Jeremy Ashkenas
018efa56f2 Merge pull request #446 from bjh/master
documentation for _.isObject
2012-01-30 06:58:28 -08:00
bjh
53829cbd5c added a false case for the isObject test documentation 2012-01-26 16:04:58 -05:00
bjh
7a2e45eb3a added documentation for _.isObject 2012-01-26 15:57:52 -05:00
Jeremy Ashkenas
4540feaa1f Merge pull request #444 from mark-rushakoff/uniqueid-doc
Clarify docs: return value of uniqueId
2012-01-26 06:24:09 -08:00
Mark Rushakoff
ae3720d200 Clarify docs: return value of uniqueId 2012-01-25 20:59:27 -08:00
Jeremy Ashkenas
3512e7fc5c Fixes #435 -- allows _.max and _.min on arrays of dates without converting them to numbers. 2012-01-24 10:40:20 -05:00
Jeremy Ashkenas
908c015631 Fixes #442 -- broken link to Objects/functions on the homepage 2012-01-24 10:33:14 -05:00
Jeremy Ashkenas
eeea70c457 Underscore 1.3.1 2012-01-23 17:56:29 -05:00
Jeremy Ashkenas
cdf43ea742 Fixes #429 -- don't escape slash escapes in the body of interpolations... 2012-01-23 17:33:48 -05:00
Jeremy Ashkenas
a8c956fe6a Fixes #436 -- document the second argument to _.flatten 2012-01-23 17:03:19 -05:00
Jeremy Ashkenas
d959c019f8 clarify that sortBy is ascending. 2012-01-23 16:10:49 -05:00
Jeremy Ashkenas
5ed8b6e6ce using a cached reference to hasOwnProperty (again) 2012-01-23 16:05:56 -05:00
Jeremy Ashkenas
f1ecedf64a Merge pull request #440 from arlolra/has
has
2012-01-23 13:03:56 -08:00
Jeremy Ashkenas
f6a1b97426 Merge branch 'master' of github.com:documentcloud/underscore 2012-01-23 15:48:53 -05:00
Jeremy Ashkenas
99c17c4a0d reverting an old change -- _.extend should absolutely copy undefined values. 2012-01-23 15:48:35 -05:00
Arlo Breault
3898597b12 has 2012-01-18 20:34:54 -08:00
Jeremy Ashkenas
9c88b72362 Merge pull request #433 from petejkim/master
added "collect" alias for "map"
2012-01-13 09:01:23 -08:00
Peter Jihoon Kim
978255b778 added "collect" alias for "map" 2012-01-14 00:57:41 +08:00