Commit Graph

101 Commits

Author SHA1 Message Date
Jeremy Ashkenas
225d795836 merging in iamnoah's optimizations for the isType family of functions, and other references to core prototoypes 2009-12-09 12:44:55 -05:00
Jeremy Ashkenas
e863fbf285 Merge branch 'master' of git://github.com/iamnoah/underscore 2009-12-09 12:07:24 -05:00
Noah Sloan
76cccb6a2d added JSLitmus tests for isType functions 2009-12-09 10:25:58 -06:00
Jeremy Ashkenas
2ba87d6b44 adding test case for previous commit 2009-12-09 11:20:09 -05:00
Jeremy Ashkenas
99564138e8 added an extra check in isEqual to test for falsy against truthy values (so as to short circuit before trying to look for properties on null) 2009-12-09 11:17:30 -05:00
Jeremy Ashkenas
3eb9c28039 Underscore shouldn't be able to iterate over the letters of a string cross-browser -- indexing into a string isn't supported in IE 2009-12-08 17:31:01 -05:00
Noah Sloan
37930f92e0 doh. messed up isNumber fix 2009-12-08 16:03:53 -06:00
Noah Sloan
6554c6d976 have to define isNumber before _.each will work in IE 2009-12-08 15:57:04 -06:00
Noah Sloan
a5454d6972 cache hasOwnProperty 2009-12-08 14:24:44 -06:00
Noah Sloan
38cae13d69 cache wrapper methods 2009-12-08 14:21:05 -06:00
Noah Sloan
8c7fcb7781 cache is string and toString to improve performance 2009-12-08 14:11:28 -06:00
Jeremy Ashkenas
0ed4212ec6 adding pervasive safety checks for using Underscore functions on objects that jsut happen to have 'map', 'reduce', or 'filter' etc. properties that aren't functions. 2009-12-08 00:06:34 -05:00
Jeremy Ashkenas
30329c051b dont try to look at the keys of zero-length arrays or arguments objects when calling each() 2009-12-07 23:41:55 -05:00
Jeremy Ashkenas
2afcffb30a added guards to _.first and _.rest and tests, they now work as function parameters to _.map 2009-12-07 23:36:31 -05:00
Jeremy Ashkenas
21e0cbc229 simplified the bindAll example 2009-12-07 00:26:00 -05:00
Jeremy Ashkenas
f2670259d1 0.5.0 is out, with variants of grayrest's patches 2009-12-07 00:14:07 -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
Jeremy Ashkenas
2875f3145d added a links section to the documentation, with Underscore.lua and collections libraries galore 2009-12-06 23:09:36 -05:00
Jeremy Ashkenas
53122d08bd documenting isRegExp 2009-12-06 22:50:38 -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
4bd535e7f1 Underscore 0.4.7 is done 2009-12-06 14:13:25 -05:00
Jeremy Ashkenas
7a1f92a8c5 documentation for Underscore 0.4.7, with isDate, isNaN, and isNull 2009-12-06 13:43:16 -05:00
Jeremy Ashkenas
86c2ad2b1f maintain a single reference to the Object.prototype 2009-12-06 13:20:56 -05:00
Jeremy Ashkenas
689cd97e03 pushed all hasOwnProperty checks into _.keys, speeding _.keys up by about 25%, and using it to simplify other functions: _.each, _.isEmpty, _.functions 2009-12-06 13:16:44 -05:00
Jeremy Ashkenas
a97836a175 a couple of grayrest's speed improvements for _.isEqual 2009-12-06 12:55:43 -05:00
Jeremy Ashkenas
79cb7bb17b stop assigning to arguments object in _.compose 2009-12-06 12:35:11 -05:00
Jeremy Ashkenas
8ca9739dfe adding a documentcloud credit to the doc page 2009-12-03 21:03:49 -05:00
Jeremy Ashkenas
6b1ad73cd2 commented, underscore is 20K now 2009-11-30 23:21:48 -05:00
Jeremy Ashkenas
4b2744a75a 0.4.6 is on the books, with kylichuku's range function 2009-11-30 23:20:11 -05:00
Kirill Ishanov
64cac959a5 re-generated underscore-min.js to include _.range() function 2009-12-01 02:26:04 +03: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
Kirill Ishanov
d8cf99ba89 initial implementation of _.range 2009-12-01 00:44:13 +03:00
Jeremy Ashkenas
67f1e8a9c8 merged matehat's toArray patch 2009-11-22 00:50:08 -05:00
matehat
3c0b7125a7 '_.toArray' now checks whether the iterable object contains a 'toArray' method to delegate to. 2009-11-21 22:02:31 -05: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
Luke Sutton
8cac2d5bd7 Add init(), tail() and reverse() Array functions. Alias first() to head(); 2009-11-19 11:07:14 +10:30
Jeremy Ashkenas
86e6dd58c2 code-ify stopIteration in the docs 2009-11-18 16:11:35 -05:00
Jeremy Ashkenas
c9e46262ab Underscore 0.4.4, with isNumber, isString, and isEqual(NaN, NaN) 2009-11-18 16:09:55 -05:00
Jeremy Ashkenas
b932867dec regression fix: implied global 'i' in _.indexOf() -- thanks to Sveinung Rosaker. 2009-11-14 08:31:42 -05:00
Jeremy Ashkenas
80939448a7 fixing broken _.breakLoop test -- implementation was fine, test was out of date. 2009-11-12 21:31:03 -05:00
Jeremy Ashkenas
b5e1101610 0.4.3, with fixed export for CommonJS and StopIteration support 2009-11-09 22:17:47 -05:00
Tim Caswell
111f1cbc0d Make the exports system include the wrapper function in node.js 2009-11-09 16:46:34 -06:00
Jeremy Ashkenas
f6e67a5bf2 version 0.4.2 -- quick patch to rename get() to value() for clarity, and adding jQuery comparisons in the speed tests 2009-11-09 08:28:32 -05:00
Jeremy Ashkenas
7127d404d2 correcting documentation 2009-11-08 14:25:54 -05:00
Jeremy Ashkenas
cb85480659 0.4.1 is out, with array methods proxied for wrapped objects, an _.breakLoop(), and an _.isEmpty() 2009-11-08 14:18:24 -05:00
Jeremy Ashkenas
5eec4e5d22 adding breakLoop 2009-11-08 12:07:10 -05:00