Jeremy Ashkenas
ba96d168ec
Fixes Issue #350 -- Making _.escape dumber to allow double-escaping of HTML entities.
2011-10-31 12:31:02 -04:00
Jeremy Ashkenas
cc6a9d494d
Merging in escaping for Underscore templates, using <%- syntax. Sorry Eco.
2011-10-05 16:19:00 -04:00
Jeremy Ashkenas
7d0e4169a9
shortening module names.
2011-10-04 15:56:32 -04:00
Jeremy Ashkenas
2d06e1d526
Issue #70 -- implementing each, find, all, any, etc. without the use of a try/catch/throw. Minor speedup + avoids destroying the stack trace.
2010-12-01 11:08:34 -05:00
Jason Davies
47eb154ccf
Preserve backslashes in _.template()
...
For example, templates containing things like the literal string
`\ribbit` weren't being escaped properly when being compiled. The `\r`
was being interpreted as a carriage return character.
I've added a test for this too, and all the existing tests pass.
2010-11-09 22:59:03 +00:00
Jeremy Ashkenas
5b4b308c91
Fixing template settings
2010-10-07 10:44:49 -04:00
Ryan W Tenney
81ce3ee0bd
Updated templateSettings regexes in tests, replacing the . with [\s\S]
2010-10-05 22:34:24 -04:00
Jeremy Ashkenas
faa672ecd9
Underscore 1.1.1
2010-10-05 17:52:36 -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
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
Jeremy Ashkenas
b2b5a5390b
merging a variant of svieira's fix for preserving whitespace within templates.
2010-07-20 13:37:27 -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
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
a2aab7c699
merging ratbeard's numerous improvements
2010-02-24 11:38:27 -05:00
Rick Fletcher
38a82591b1
Added failing test for quotes in statements with regex-significant characters in tokens
2010-02-23 23:44:25 -08:00
Rick Fletcher
625adb81a3
Added tests for templates with regex-significant characters in their delimiters
2010-02-23 23:41:51 -08:00
Mike Frawley
5a5e14d7a4
add #times utility method.
...
_(3).times(alert)
added tests and internal docs
2010-02-17 10:21:59 -06:00
Jeremy Ashkenas
7d9e603be8
Underscore 0.5.6, with custom template delimiters
2010-01-18 12:45:04 -05:00
noah
94195e661d
Made _.template delimeters customizable
2010-01-15 23:25:52 -05:00
Jeremy Ashkenas
6866ffb840
adding a test for single quotes in templates
2010-01-05 11:28:29 -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
66dc6c2ac1
shrunk down all of the 'is' functions into a single generation, added isRegExp, added a regexp equality test to isEqual, after grayrest's patch
2009-12-06 22:48:40 -05:00
Jeremy Ashkenas
7a1f92a8c5
documentation for Underscore 0.4.7, with isDate, isNaN, and isNull
2009-12-06 13:43:16 -05:00
Kirill Ishanov
451d9c5d62
implemented 6 more passing tests for range. Now works like python's range
2009-12-01 02:10:56 +03:00
Jeremy Ashkenas
ae968a6ea0
Underscore 0.4.5, with first/rest, head/tail, and all Array functions guaranteed to work on 'arguments' objects. Many method implementations reworked to use _.rest()
2009-11-19 09:37:56 -05:00
Jeremy Ashkenas
b5f111e8d4
Merge branch 'master' of git://github.com/lukesutton/underscore
2009-11-19 08:35:10 -05:00
Jeremy Ashkenas
f8e939d30a
fixing template test validation for IE
2009-11-18 21:54:50 -05:00
Luke Sutton
4ed79d5f77
Correct the test for functions() to account for the new functions and aliases.
2009-11-19 11:35:21 +10:30
Jeremy Ashkenas
c9e46262ab
Underscore 0.4.4, with isNumber, isString, and isEqual(NaN, NaN)
2009-11-18 16:09:55 -05:00
Jeremy Ashkenas
5eec4e5d22
adding breakLoop
2009-11-08 12:07:10 -05:00
Jeremy Ashkenas
b5920e94a3
added an isEmpty function that works on arrays and objects
2009-11-07 23:04:18 -05:00
Jeremy Ashkenas
ed37b9df49
0.4.0 is out, with OOP-style and chaining
2009-11-07 14:29:40 -05:00
Jeremy Ashkenas
eca085a9d9
typo
2009-10-29 14:58:50 -04:00
Jeremy Ashkenas
e9bc165bc3
adding an identity test (silly, I know) to utility tests
2009-10-29 14:50:48 -04:00
Jeremy Ashkenas
4a83fcdd26
version 0.2.0 is out, with inject -> reduce, JS standard methodname aliases, a compose(), and a lastIndexOf()
2009-10-28 18:49:50 -04:00
Jeremy Ashkenas
6d52832a73
going to version 0.1.1 with noConflict
2009-10-28 12:37:55 -04:00
Jeremy Ashkenas
5c46c60b06
finished off the complete test suite for underscore -- let's polish off the corners and provide some docs
2009-10-26 08:40:14 -04:00