Compare commits

...

3039 Commits
1.2.0 ... 3.9.3

Author SHA1 Message Date
jdalton
2ecdedd5b4 Bump to v3.9.3. 2015-05-25 16:25:57 -07:00
jdalton
358477c31b Rebuild lodash and docs. 2015-05-25 15:58:57 -07:00
jdalton
c1948f10a2 Avoid NaN use in isIndex. 2015-05-25 12:19:00 -07:00
jdalton
d33c487b29 Add parseFloat to contextProps. 2015-05-25 10:03:30 -07:00
Chris Hiestand
b309b507eb Add tests for parseFloat issues with isIndex and _.set. 2015-05-25 09:56:16 -07:00
jdalton
daa8428b32 Drop parseFloat in isIndex in favor of a more strict regex. [closes #1229] 2015-05-25 09:39:36 -07:00
jdalton
0529df7632 Bump to v3.9.2. 2015-05-24 00:45:38 -07:00
jdalton
fc31fb9eba Rebuild lodash and docs. 2015-05-24 00:45:37 -07:00
jdalton
54436e341a Update travis deps. 2015-05-24 00:45:31 -07:00
jdalton
fc35ac4d67 Cleanup shortcut fusion test. 2015-05-23 21:43:01 -07:00
jdalton
28a0b6f901 Fix test for removal of _.support.funcNames. 2015-05-23 20:12:50 -07:00
jdalton
1b8f2c2adb Make isLaziable work with wrapped lodash methods. 2015-05-23 20:12:20 -07:00
jdalton
6c8988ab69 Use POSITIVE_INFINITY and NEGATIVE_INFINITY more. 2015-05-23 16:15:12 -07:00
jdalton
e3c600a681 Remove rogue new line. 2015-05-23 16:14:37 -07:00
jdalton
979e0de659 Remove unused function charAtCallback. 2015-05-23 16:14:15 -07:00
jdalton
a76c10416d Tweak docs for _.difference, _.intersection, _.union, & _.xor. [ci skip] 2015-05-23 12:37:36 -07:00
jdalton
1276bf8c72 Correct _.sample to avoid favoring putting the second half of the array into the front and the first half in the back. 2015-05-23 00:05:34 -07:00
jdalton
9ef5c5d639 Change var endIndex to lastIndex for source consistency. 2015-05-22 22:38:46 -07:00
jdalton
69f51896c9 Optimize _.sample. 2015-05-22 22:38:39 -07:00
jdalton
5f845aa6f8 Optimize baseIsEqual. 2015-05-22 22:08:29 -07:00
jdalton
87c610beaa Fix doc typos for arrayExtremum and baseMatchesProperty. [ci skip] 2015-05-22 00:44:08 -07:00
jdalton
3a331ec156 More which/that switching in docs. [ci skip] 2015-05-22 00:36:57 -07:00
jdalton
6c5ac490ab Document partial args of _.method and _.methodOf. [ci skip] [closes #1223] 2015-05-22 00:36:51 -07:00
jdalton
50b9840db1 Change dep version in lodash-cli npm-shrinkwrap.json for travis tests. 2015-05-20 08:00:25 -07:00
jdalton
41e884a1d2 Poison the free variable root in Node.js. 2015-05-20 07:59:52 -07:00
jdalton
15841b191d Bump to v3.9.0. 2015-05-19 08:19:55 -07:00
jdalton
65514d89ad Rebuild lodash and docs. 2015-05-19 08:19:42 -07:00
jdalton
c6f8896826 Ensure _.get can return null values. [closes #1216] 2015-05-19 08:18:46 -07:00
jdalton
882d84f1e6 Ensure _.merge skips undefined values if a destination value exists. 2015-05-18 07:30:25 -07:00
jdalton
0eba3a3678 Update ecstatic and istanbul travis deps. 2015-05-18 07:30:24 -07:00
jdalton
756b28c3ab Rename value param to srcValue. 2015-05-17 16:13:54 -07:00
jdalton
d78ebc40ae Fix isEqual tests on older Safari. 2015-05-17 09:14:50 -07:00
jdalton
58aea21b82 Use 'xo' instead of 'hi' for string tests. 2015-05-17 00:55:30 -07:00
jdalton
c2b1d61dd1 Add toObject to _.pairs. 2015-05-17 00:55:30 -07:00
jdalton
f4d72dba06 Adjust test labels for consistency. 2015-05-17 00:55:30 -07:00
jdalton
31e81d7be2 Add string tests for _.isMatch, _.matches, & _.matchesProperty. 2015-05-17 00:55:30 -07:00
jdalton
6c9123beee Add toObject use to baseIsMatch. 2015-05-16 18:53:33 -07:00
jdalton
0fa0397da2 Add checks back to isEqual and simplify checks in baseIsEqual. 2015-05-16 18:53:33 -07:00
jdalton
b652fc7e1a Reduce baseIsMatch and isMatch by adding getMatchData. 2015-05-16 15:24:59 -07:00
jdalton
c42fea0d3d Remove isStrictComparable use from _.isEqual. 2015-05-16 13:29:41 -07:00
jdalton
48a56a848a Add test for modularized flow and flowRight. 2015-05-16 11:30:57 -07:00
jdalton
d6937baa8e Simplify getFuncName. 2015-05-16 11:30:43 -07:00
jdalton
3490f8acb5 Ensure LodashWrapper.prototype.thru exists before creating a wrapper in flow. 2015-05-16 07:01:15 -07:00
jdalton
46ace7e8e8 Simplify getNative. 2015-05-15 11:30:57 -07:00
jdalton
698956e130 Move parseFloat into isIndex. [closes #1209] 2015-05-15 08:55:47 -07:00
jdalton
b25cd39953 Add isObject check to getNative. 2015-05-15 01:29:17 -07:00
jdalton
de4f5eb2ca Allow for getNative to accept a nullish object value. 2015-05-15 00:30:20 -07:00
jdalton
ccc5fa3981 Add getNative helper. 2015-05-15 00:23:27 -07:00
jdalton
b899a19184 Change "it is" to "it's". [ci skip] 2015-05-15 00:22:14 -07:00
jdalton
6af7fac344 Minor style nit in _.isObject. 2015-05-14 21:27:11 -07:00
jdalton
49ef2b4d54 Clarify _.debounce and _.throttle docs. [ci skip] 2015-05-14 09:13:00 -07:00
jdalton
fcc09a7375 Use strict equality check since its type isn't guaranteed. 2015-05-13 23:39:06 -07:00
jdalton
8e9ad4df97 Avoid testing Backbone in IE6 in sauce. 2015-05-13 23:25:47 -07:00
jdalton
4dfcfd2542 Cleanup test/backbone.html and test/underscore.html. 2015-05-13 23:25:31 -07:00
jdalton
12081c9bd6 Bypass vm module use for ChakraNode. 2015-05-13 21:04:51 -07:00
jdalton
abee7fdfa2 Update vendors. 2015-05-13 21:03:09 -07:00
jdalton
ca0bc0632b Reduce _.has. 2015-05-13 08:57:03 -07:00
jdalton
e465750cd2 Fix failing _.has tests in Rhino. 2015-05-13 00:51:58 -07:00
jdalton
934b08f720 Avoid mixing boolean and object types in variable assignments. 2015-05-12 23:41:14 -07:00
jdalton
78cc98840b Remove fast path from _.isMatch. 2015-05-12 21:19:12 -07:00
jdalton
d4cd7a120f Remove support.funcDecomp and support.nonEnumStrings. 2015-05-12 21:18:35 -07:00
jdalton
4b6c91bbf1 Remove support.nonEnumArgs. 2015-05-12 09:23:07 -07:00
jdalton
e3be2b4451 Ensure _.has treats sparse arrays as dense. 2015-05-12 08:58:37 -07:00
jdalton
c6ff845ecb Ensure _.intersection works with a single array. [closes #1199] 2015-05-11 23:52:56 -07:00
jdalton
846bde35ff Use hasOwnProperty instead of objToString for the creation of reIsNative to avoid issues with core-js. [closes #1197] 2015-05-11 10:31:38 -07:00
jdalton
69990ae226 Fix test error in Rhino with CommonJS support. 2015-05-10 23:13:18 -07:00
jdalton
415fc81577 Remove Narwhal reference from source. 2015-05-10 20:20:18 -07:00
jdalton
b675566e23 Cleanup bizarro values, vm values, iframe values, worker addition, & module additions. 2015-05-10 20:17:57 -07:00
jdalton
190da0dcd4 Capitalize comments in test/index.html. [ci skip] 2015-05-10 20:09:14 -07:00
jdalton
5c40f93ca3 Fix AMD tests in PhantomJS. 2015-05-10 17:05:46 -07:00
jdalton
879c1e4992 Increase test coverage. 2015-05-09 18:02:09 -07:00
jdalton
311334c9e1 Add doc examples to _.gt, _.gte, _.lt, & _.lte. [ci skip] 2015-05-09 15:25:32 -07:00
jdalton
dc5268b0c0 Add _.gt, _.gte, _.lt, _.lte, & _.eq unit tests. 2015-05-09 12:25:31 -07:00
jdalton
d77ace6dc3 Upate tested Chrome version in sauce.js. 2015-05-08 18:56:20 -07:00
jdalton
f0b3c1a9ab Cleanup createFlow. 2015-05-08 18:55:57 -07:00
jdalton
9efb73f592 Remove nativeAssign and getOwnPropertySymbols use. 2015-05-08 11:36:44 -07:00
jdalton
569b4b29aa Add case of 5 to createCtorWrapper to align with bindCallback. 2015-05-08 11:36:23 -07:00
jdalton
a61bde5b78 Ensure _.bind works with ES6 class constructors. [closes #1193] 2015-05-08 09:49:54 -07:00
jdalton
542dd67892 Update param docs for createExtremum. [ci skip] 2015-05-08 00:17:48 -07:00
jdalton
172eca6081 Avoid using require in source because browserify does a quick regexp match for \brequire\b before deciding whether to build an AST to get require calls. 2015-05-07 23:59:51 -07:00
jdalton
004aaed783 Remove odd string support from createExtremum. 2015-05-07 23:53:50 -07:00
jdalton
a1b15df648 Update tested Rhino to 1.7.6. 2015-05-07 01:05:16 -07:00
jdalton
b5d5bef678 Avoid undefined length variable use in createExtremum. 2015-05-07 00:38:22 -07:00
Len Smith
421df0dff3 Make null sorted right behind undefined and NaN. 2015-05-07 00:34:12 -07:00
Armaan Ahluwalia
5b5e29cb7b Fixed iteratees doc typos. [ci skip] 2015-05-06 14:58:03 -07:00
jdalton
db67ae12ec Optimize _.max and _.min when invoked with iteratees and add _.gt, _.gte, _.lt, _.lte, & _.eq. 2015-05-06 08:56:50 -07:00
jdalton
7dfd7ad5b9 Minor adjustments to param docs for baseCompareAscending and matchesProperty. [ci skip] 2015-05-06 01:37:56 -07:00
jdalton
ca5fa9e84d Add support for an immutable Map to _.memoize.Cache. 2015-05-05 23:13:00 -07:00
jdalton
1afcfa4406 Use precomputed values for MAX_ARRAY_LENGTH and MAX_SAFE_INTEGER. 2015-05-04 21:53:12 -07:00
jdalton
95b1455b62 Consistently use callback as the variable to store getCallback() results. 2015-05-04 09:06:06 -07:00
jdalton
d825937411 Ensure customizer results are respected by _.isEqual. 2015-05-03 22:57:45 -07:00
jdalton
ee182df533 Optimize object comparisons in _.isEqual. 2015-05-03 19:38:58 -07:00
jdalton
14651d8ea8 Remove customizer assignment from clone and cloneDeep. 2015-05-03 17:20:51 -07:00
jdalton
7e4ed7c1a9 Ensure baseCreate works in ExtendScript. 2015-05-03 13:47:40 -07:00
jdalton
13fe88c03f Cleanup baseIsMatch and equalArrays. 2015-05-02 23:00:57 -07:00
jdalton
7b80a780c7 Remove old Opera from Sauce tests. 2015-05-01 22:16:59 -07:00
jdalton
2b465bdf82 Update QUnit dev dep. 2015-05-01 21:00:50 -07:00
jdalton
6d52119597 Bump to v3.8.0. 2015-05-01 00:45:06 -07:00
jdalton
b75041173c Rebuild lodash and docs. 2015-05-01 00:45:06 -07:00
jdalton
23eba0a029 Avoid isArrayLike in createBaseEach to bail out early when nullish. 2015-05-01 00:45:06 -07:00
jdalton
566781cab2 Loosen -0 and 0 checks. 2015-05-01 00:44:55 -07:00
jdalton
0ea1fc5602 Avoid var name pad in composeArgsRight. 2015-04-30 09:09:47 -07:00
jdalton
2ce9e09e8b Ensure _.padLeft and _.padRight handle empty strings correctly. 2015-04-30 09:09:46 -07:00
Tim D
6cab7ceb0f Removing length assignment in baseFlatten for a perf win. 2015-04-29 19:57:39 -07:00
jdalton
8ae7d8aa07 Simplify SameValueZero doc notes. [ci skip] 2015-04-29 00:25:36 -07:00
jdalton
ce6ccef2d0 Ensure baseAt, basePullAt, and pullAt handle nullish values correctly. 2015-04-29 00:25:36 -07:00
jdalton
2c6d880542 Loosen restrictions of _.intersection and others to accept array-like objects and add isArrayLike helper. [closes #1163] 2015-04-29 00:25:36 -07:00
jdalton
bf89287c56 Optimize lazy slice for start of 0 and an end value. 2015-04-29 00:25:36 -07:00
jdalton
df176dfe8a Fix modularized npm build tests. 2015-04-26 14:22:46 -07:00
jdalton
141a32d388 Add _.callback test for augmenting source objects. 2015-04-26 10:59:29 -07:00
jdalton
37786b76ed Minor whitespace nits. [ci skip] 2015-04-26 00:46:33 -07:00
jdalton
02b920f259 Add _.flow and _.flowRight tests for curried functions with placeholders. 2015-04-23 08:38:58 -07:00
jdalton
31e25f88a0 Narrow bitmask check in createFlow. 2015-04-23 08:06:51 -07:00
jdalton
231c8a468e Replace "that" with "which" in pickByArray and pickByCallback docs. [ci skip] 2015-04-22 23:10:17 -07:00
jdalton
ae346f564f Avoid lazy eval optimization in createFlow if metadata has placeholder arguments. [closes #1160] 2015-04-22 20:44:56 -07:00
jdalton
fcc0608cf2 Only use built-in Object.assign when in strict mode. 2015-04-22 20:23:30 -07:00
jdalton
641cd63462 Fix old V8 JIT bug that has cropped up again. 2015-04-22 20:17:39 -07:00
jdalton
0b907a3efa Make tests work in Phantom 2. 2015-04-22 20:16:43 -07:00
jdalton
ce180cf2bf Excuse Underscore _.now test to avoid occasional false fail in sauce andrioid. 2015-04-22 07:18:14 -07:00
jdalton
d97276404c Update excused Underscore tests. 2015-04-22 07:09:52 -07:00
Ray Hammond
d5a9b4344b Removed unused variables identified by JSHint. 2015-04-21 16:58:10 -07:00
jdalton
e317fdfa3d Cleanup deep path tests. 2015-04-21 08:07:49 -07:00
jdalton
150ea2639a Add complex tests for unquoted bracketed property names. 2015-04-21 08:03:14 -07:00
jdalton
a551348b40 Fix preventExtensions definition typo. [closes #1153] 2015-04-21 07:59:02 -07:00
jdalton
3429b5d661 Ensure empty brackets are ignored by _.get and _.set. 2015-04-21 00:02:28 -07:00
jdalton
c8314b215b Doc and var name tweaks to _.unzip, _.unzipWith, and _.zipWith. 2015-04-20 08:59:53 -07:00
jdalton
5929f7d23b Newline nit in _.assign doc. [ci skip] 2015-04-20 00:35:41 -07:00
jdalton
85a7df3d27 Add _.unzipWith. 2015-04-20 00:10:12 -07:00
jdalton
e6c5a0e848 Update iOS comment on getLength. [ci skip] 2015-04-19 20:04:13 -07:00
Ray Hammond
92dee72b10 Added two missing semicolons. 2015-04-19 17:51:14 -07:00
jdalton
4d6e57a5e6 Make _.zipWith act like _.zip when no iteratee is provided and make _.unzip ignore non array or arguments object values. 2015-04-19 10:32:27 -07:00
jdalton
936a1c2764 Add support for thisArg in zipWith. 2015-04-19 08:02:43 -07:00
jdalton
a08a3c6096 Cleanup tests. 2015-04-18 22:31:46 -07:00
thirdcreed
82be40eace Add _.zipWith. 2015-04-18 11:13:03 -07:00
jdalton
20ba0bd1dc Fix _.uniqueId test to properly compare values. 2015-04-18 11:10:55 -07:00
jdalton
75ce6b82e8 Add sum to guarded doc note in _.map. [ci skip] 2015-04-17 09:04:22 -07:00
jdalton
9749ac56ba Remove extraneous docs for methods that reference others. [ci skip] 2015-04-17 08:37:55 -07:00
jdalton
746f9bb778 Add _.mapKeys. [closes #169] 2015-04-17 08:36:37 -07:00
jdalton
f2dae588aa Add test labels to help track down odd false fail. 2015-04-17 08:27:14 -07:00
jdalton
9f3f0a76aa Ensure baseGet returns undefined and not null. [closes #1136] 2015-04-16 20:07:48 -07:00
jdalton
30f28a51ca Bump v3.7.0. 2015-04-15 20:08:34 -07:00
jdalton
3e22344782 Rebuild lodash and docs. 2015-04-15 19:32:58 -07:00
jdalton
0b20d89d62 Ensure _.times floors n float values. 2015-04-15 19:21:13 -07:00
jdalton
80d892c744 Update Firefox versions in saucelabs.js. 2015-04-15 09:04:28 -07:00
jdalton
53326bef33 Update vendors. 2015-04-15 08:44:18 -07:00
jdalton
f05a5a3abb Fix failing strict mode _.set tests. 2015-04-15 00:00:40 -07:00
jdalton
8581be4977 Ensure baseGet and result work with strings on nested objects. 2015-04-14 22:34:46 -07:00
jdalton
0e8277ba9e Cleanup path methods. 2015-04-14 21:19:31 -07:00
jdalton
3cc2f83912 Add more string character access tests and adjust array path tests. 2015-04-14 21:18:50 -07:00
jdalton
177034a498 Move _.filter benchmark and cleanup labels. 2015-04-14 21:15:18 -07:00
jdalton
f4d06e5183 Remove unneeded "use strict" directive. 2015-04-14 12:54:30 -07:00
jdalton
637a6b5f7e Optimize _.invoke. 2015-04-14 12:29:41 -07:00
jdalton
75445b8b98 Update ecstatic travis dep. 2015-04-14 12:14:12 -07:00
jdalton
f96de55ac7 Optimize isKey. 2015-04-14 12:13:54 -07:00
jdalton
c4d4af3b5a Make freeGlobal detect align with freeSelf and freeWindow checks. 2015-04-13 20:29:58 -07:00
jdalton
5dfee44340 Cleanup doc blocks. [ci skip] 2015-04-13 20:29:26 -07:00
jdalton
99f5857d84 Add stable sort tests for objects. 2015-04-13 20:28:25 -07:00
jdalton
520f7c6812 Ensure index in baseSortByOrder is an integer. 2015-04-13 09:30:01 -07:00
jdalton
63d493aa1f Cleanup _.sortBy, _.sortByAll, _.sortByOrder, & baseSortByOrder. 2015-04-13 08:58:10 -07:00
jdalton
38ab42f855 Add Object.assign reference to _.assign docs. [ci skip] 2015-04-13 07:43:35 -07:00
Graeme Yeates
bc3771f3af Support iteratee use cases for _.sortByAll and _.sortByOrder. 2015-04-12 18:29:26 -07:00
jdalton
9d90af409b Add bizarro test for Object.getOwnPropertySymbols. 2015-04-12 18:28:50 -07:00
jdalton
20183bbd57 Have baseMap use getLength and isLength. 2015-04-12 10:33:34 -07:00
jdalton
1d8efe1cf8 Cleanup deep property tests. 2015-04-11 23:08:59 -07:00
jdalton
23354d413f Add an _.invoke test for deep paths. 2015-04-11 23:08:11 -07:00
jdalton
715f03f5f1 Change call to invoke in _.debounce and _.throttle test. 2015-04-11 23:08:11 -07:00
jdalton
ff6bbaed19 Add more tests for _.sortByAll and _.sortByOrder used as iteratees of _.reduce. 2015-04-11 20:58:31 -07:00
Graeme Yeates
f82cbbab1c Use _.restParam in _.sortByAll. 2015-04-11 20:18:29 -07:00
jdalton
5a1b526b6c Add and adjust deep path examples to _.method, _.methodOf, _.property and _.propertyOf docs. [ci skip] 2015-04-11 18:40:05 -07:00
jdalton
1ef92c87fb Use query instead of inspect in various docs. [ci skip] 2015-04-11 16:33:24 -07:00
jdalton
0aef515522 Rename baseMethod to invokePath and make use of it in _.invoke. 2015-04-11 16:32:27 -07:00
jdalton
9b5c97666a Ensure symbols work for _.assign, _.defaults, & _.merge. 2015-04-11 11:42:36 -07:00
jdalton
a55d822f9a Add more comments to nativeAssign definition. [ci skip] 2015-04-10 21:24:32 -07:00
jdalton
5b2bde6e0d Simplify getSymbols. 2015-04-10 19:56:38 -07:00
jdalton
020c5b27dc Add assert labels to _.tempalte test. 2015-04-10 15:42:03 -07:00
jdalton
65457208e5 Fix feature test for IE tech preview. 2015-04-10 15:41:48 -07:00
jdalton
6eb1b98975 Fix test fails in Node 0.12. 2015-04-10 15:40:26 -07:00
jdalton
a927bab6b3 Use built-in Object.assign if available. 2015-04-10 09:19:39 -07:00
jdalton
48e3e3e8cb Add _.method and _.methodOf docs. [ci skip] 2015-04-09 09:29:23 -07:00
jdalton
b5d095401d Make _.result and _.set docs more consistent with _.get. [ci skip] 2015-04-09 08:42:05 -07:00
jdalton
b3e58d4794 Cleanup createAssigner. 2015-04-09 07:35:32 -07:00
jdalton
79b064320e Update _.assign benchmarks for newer Underscore versions. 2015-04-09 07:30:17 -07:00
Sankar Gorthi
335b8326ee Fix broken link in _.bindKey docs. [ci skip] 2015-04-08 15:22:06 -07:00
jdalton
e777020e44 Update propertyIsEnumerable mock for support.nonEnumArgs feature test changes. 2015-04-08 13:42:48 -07:00
jdalton
745d97ebe1 Replace typeof checks for undefined with === checks. 2015-04-08 09:37:35 -07:00
jdalton
bb06d98a43 Add _.has doc examples of deep paths. [ci skip] 2015-04-08 09:27:37 -07:00
jdalton
3500b0016c Store last(path) in a var. 2015-04-08 08:41:57 -07:00
jdalton
7ec916b777 Add additional backtick reference to _.escape docs. [ci skip] 2015-04-08 08:24:44 -07:00
jdalton
3c71f79929 Fix string indexes with _.has in older enviros. 2015-04-08 00:39:39 -07:00
jdalton
a83e70104c Ensure complex paths work with _.get, _.result, & _.set. 2015-04-07 19:47:31 -07:00
jdalton
85af554bac Replace work with expected value in test labels of _.get, _.isMatch, _.matches, _.matchesProperty, _.method, _.property, _.propertyOf, & _.result. 2015-04-07 18:45:39 -07:00
jdalton
885722afde Add _.has and _.methodOf tests. 2015-04-07 18:41:51 -07:00
jdalton
b2f094da01 Add another path test to a deep property test of _.result. 2015-04-07 09:29:44 -07:00
jdalton
1e85ec6758 Add more _.method tests. 2015-04-07 09:29:09 -07:00
jdalton
c8974aac3e Ensure nullish values aren't treated as empty objects in _.get, _.has, _.matchesProperty, _.property, _.propertyOf, & _.result. 2015-04-07 08:33:19 -07:00
jdalton
ad318c04e5 Use nullish more in test labels. 2015-04-07 08:19:24 -07:00
jdalton
db73e48206 Add mutation notes to docs of _.assign and _.defaults. [ci skip] 2015-04-07 08:07:00 -07:00
jdalton
d13972e0b8 Fix string test fails for _.matchesProperty, _.property, & _.result in IE 6 & 7. 2015-04-07 07:28:58 -07:00
Graeme Yeates
df74b2bfcb Remove _.noop from chainable list. [ci skip] 2015-04-07 00:31:38 -07:00
jdalton
b94b75726d Cleanup _.property and _.propertyOf tests. 2015-04-07 00:24:50 -07:00
jdalton
9a2d38acff Cleanup _.method tests. 2015-04-07 00:24:22 -07:00
jdalton
537f8f401e Cleanup _.matchesProperty tests. 2015-04-07 00:24:01 -07:00
jdalton
04f1a799dc Cleanup _.matches tests. 2015-04-07 00:23:16 -07:00
jdalton
74adb2f540 Consolidate _.get and _.result tests. 2015-04-07 00:22:11 -07:00
jdalton
a129a2509f Ensure _.method aligns with _.invoke. 2015-04-07 00:20:35 -07:00
jdalton
cc0b8e9d10 Ensure methods like _.get, _.has, _.matchesProperty, _.property, & _.propertyOf can get characters of string indexes. 2015-04-07 00:16:33 -07:00
jdalton
af8fcf234f Add _.set test for non-deep paths. 2015-04-06 13:01:27 -06:00
jdalton
e0dc2daf54 Simplify _.set for plain keys. 2015-04-06 12:59:39 -06:00
jdalton
c066e655dc Add empty path and array path coercing _.set test. 2015-04-06 12:04:07 -05:00
jdalton
2698e6f0ea Add more array path tests to _.get. 2015-04-06 11:54:09 -05:00
jdalton
63902bde9c Add array path tests to _.set. 2015-04-06 11:34:33 -05:00
jdalton
c876004fb2 Ensure _.set passes strict mode tests. 2015-04-06 09:57:26 -05:00
jdalton
633f37bfb6 Add array path tests to _.get. 2015-04-06 09:29:36 -05:00
jdalton
d70bc74dc8 Adjust baseGet and isKey to reduce code in other methods. 2015-04-05 21:41:10 -05:00
Justin Ridgewell
d7a4524e70 Add _.method and _.methodOf. 2015-04-05 13:53:54 -05:00
jdalton
fe1e27fd40 Add tests for _.add coercing params to numbers. 2015-04-05 13:45:56 -05:00
jdalton
8a7a099073 Use x even more in support definition. 2015-04-05 13:25:45 -05:00
jdalton
1b53b5f9eb Cleanup doc block for _.support.nonEnumArgs. [ci skip] 2015-04-05 13:25:29 -05:00
James
8b758ee25a Make _.add coerce augend and addend params to numbers. 2015-04-05 11:59:56 -05:00
jdalton
81c24a8478 Add _.get test for empty paths. 2015-04-05 08:38:51 -05:00
jdalton
a6f3e0b6af Remove "correctly" from test labels. 2015-04-05 08:38:14 -05:00
jdalton
6e9e8127b6 Rename variable sum in doc examples to total. [ci skip] 2015-04-05 08:15:36 -05:00
jdalton
63d43275d3 Remove unnecessary parseFloat from baseAt. 2015-04-05 08:13:32 -05:00
jdalton
cb2bf7f8fa Add tests for missing path parts for _.matchesProperty. 2015-04-05 01:39:51 -05:00
jdalton
1fae760ccd Use perl instead of sed in travis.yml. 2015-04-05 01:39:16 -05:00
jdalton
4195c4c4bf Add tests for missing path parts for _.property and _.propertyOf. 2015-04-04 14:35:50 -05:00
jdalton
13e7a1ed93 Add _.isMatch and _.matchesProperty tests for nullish object params. 2015-04-04 00:29:04 -05:00
jdalton
ea4357ca98 Add _.callback tests for deep paths. 2015-04-03 17:44:59 -05:00
jdalton
5e8255d24d Tweak path related test labels. 2015-04-03 17:08:59 -05:00
jdalton
003d6ec43f Add _.has tests for deep paths. 2015-04-03 17:08:30 -05:00
jdalton
9749ff7c67 Add a non-deep property test for _.get. 2015-04-03 12:56:12 -05:00
jdalton
c88589e0e5 Add _.result tests for deep paths. 2015-04-03 12:55:42 -05:00
jdalton
32ef1bb7a5 Add deep props to key tests to make it more interesting. 2015-04-03 12:47:26 -05:00
jdalton
206c65904f Add _.matchesProperty test for deep props. 2015-04-03 12:47:08 -05:00
jdalton
219d4688e4 Ensure path a property name is teated as a key before a path in _.get and _.set. 2015-04-03 12:36:31 -05:00
jdalton
adc687f0a0 Add _.property and _.propertyOf tests for deep paths. 2015-04-03 12:22:38 -05:00
jdalton
88e59c9a5a Cleanup tests. 2015-04-03 11:46:55 -05:00
jdalton
71a89a575f Add _.get and _.set tests. 2015-04-03 11:46:37 -05:00
jdalton
e3dc8dfcf4 Remove rogue newline in initCloneByTag doc block. [ci skip] 2015-04-03 02:12:14 -05:00
jdalton
2dd77d5bc7 Change "method" to "function". [ci skip] 2015-04-03 02:11:42 -05:00
jdalton
0192226bb3 Use "length" when referring to a property name. [ci skip] 2015-04-03 02:11:16 -05:00
jdalton
faf2658da2 Move getLength closer to like functions and give it a proper jsdoc block. 2015-04-03 02:10:21 -05:00
jdalton
9a1c00d2dc Use x a bit more in support definition to prevent aggressive minifier modifications. 2015-04-01 21:42:57 -07:00
jdalton
4a8695caff Use getLength to avoid an iOS JIT bug. 2015-04-01 21:39:37 -07:00
jdalton
b28016bfeb Simplify isLength check in _.keys. 2015-04-01 12:07:12 -07:00
jdalton
4758a9e66d Ensure _.inRange swaps start with end when start is greater than end. [closes #1099] 2015-04-01 08:43:42 -07:00
Trevor Adams
97bd1ef4ec Minor change to _.once to avoid an extra var swap. 2015-04-01 08:38:02 -07:00
jdalton
2adac8bdae Use _.restParam in createAssigner. 2015-04-01 01:57:19 -07:00
jdalton
3c56914822 Simplify isLoose check in baseIsEqualDeep. 2015-04-01 00:08:31 -07:00
jdalton
c5cc907838 Ensure _.match and _.matchesProperty compares functions by reference. [closes #1101] 2015-03-31 23:41:15 -07:00
jdalton
0907aabacd Avoid bug in older browsers where an unmatched capture group returns an empty string. 2015-03-31 09:09:17 -07:00
jdalton
f4290bda7f Update test deps. 2015-03-31 01:06:09 -07:00
jdalton
4bdb82a7a2 Ensure toPath works with a nullish value. 2015-03-31 00:50:47 -07:00
jdalton
6a696dde3a Add _.set tests. 2015-03-31 00:15:46 -07:00
jdalton
8481684a82 Fix start and end typo mix up in _.range docs. [closes #1095] [ci skip] 2015-03-30 21:05:48 -07:00
Benjamin Tan
03aa8b3356 Minor documentation and test name nits. [ci skip] 2015-03-30 20:58:20 -07:00
jdalton
64bfed2640 Clarify _.uniq docs. [ci skip] 2015-03-30 00:55:30 -07:00
jdalton
2edcc89303 Add _.get and _.set. 2015-03-29 20:59:48 -07:00
jdalton
18313f2e90 Minor word nit for mapSet doc. [ci skip] 2015-03-29 20:57:19 -07:00
jdalton
0ff96418bd Simplify reIsDeepProp and rePropName. 2015-03-29 20:32:25 -07:00
Justin Ridgewell
1480abf0e8 Fix Worker tests in Chrome. See https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Browser_notes. 2015-03-29 18:34:48 -07:00
jdalton
e7ba75d533 Make toPath more robust and add support for deep properties to _.has and _.matchesProperty. 2015-03-29 15:43:53 -07:00
jdalton
044291d940 Add deep property support to _.has. 2015-03-29 08:59:42 -07:00
jdalton
ad62efcb9e Make reComboMarks singular for naming consistency. 2015-03-29 08:08:46 -07:00
jdalton
0dc59d9481 Add support for brackets to toPath. 2015-03-29 08:08:23 -07:00
Justin Ridgewell
11ab3034b1 Ensure _.result calls deep function with correct context. 2015-03-29 08:07:36 -07:00
Justin Ridgewell
c594bda77f Simplify getProperty and friends. 2015-03-29 00:07:13 -07:00
jdalton
8218b74fb3 Remove propertyDeep, propertyDeepOf, and resultDeep in favor of deep property path support in existing methods. 2015-03-28 13:16:16 -07:00
Joshua Piccari
3d0beb1a2e Add _.propertyDeep and _.propertyDeepOf. 2015-03-28 09:54:40 -07:00
Joshua Piccari
515cfd48d8 Add _.resultDeep. 2015-03-28 09:48:55 -07:00
jdalton
1448bab5b3 Clear func in function created by _.before without requiring an additional call. [closes #1088] 2015-03-28 00:39:04 -07:00
jdalton
2884f8acb8 Ensure _.intersection of a single array returns an empty array. [closes #1085] 2015-03-26 13:17:41 -07:00
jdalton
075cae4efb Use basePullAt in _.remove. 2015-03-26 09:03:29 -07:00
Justin Ridgewell
d2b98323dd Don't mutate array during #remove. [closes #1079] 2015-03-26 09:02:55 -07:00
jdalton
b1a81a85b1 Add a test for _.remove and index params. 2015-03-26 07:29:36 -07:00
jdalton
668384649a Change "Iterator" typo to "Iteratee" in docs. [ci skip] 2015-03-26 07:29:36 -07:00
jdalton
a7252b1a7f Bump to v3.6.0. 2015-03-24 22:41:59 -07:00
jdalton
a4e58e4d55 Rebuild lodash and docs. 2015-03-24 22:41:53 -07:00
jdalton
4241e01364 Cleanup comment links. [ci skip] 2015-03-24 22:34:57 -07:00
jdalton
d7d7952138 Increase test coverage by modifying the source to hit the branch of getFuncName used for minified builds. 2015-03-24 20:15:33 -07:00
jdalton
9cc2253339 Add npm i step to contributing.md. [ci skip] 2015-03-24 08:15:32 -07:00
jdalton
6831802590 Rename predicate to iteratee in _.uniq, _.countBy, _.groupBy, _.indexBy, & _.map docs. [closes #1071] [ci skip] 2015-03-23 23:34:33 -07:00
jdalton
9d79cc7e87 Make _.deburr handle combining diacritical marks. [closes #1070] 2015-03-23 20:50:04 -07:00
jdalton
763b003a11 Add note about _.runInContext to _.mixin docs. [ci skip] 2015-03-23 20:04:13 -07:00
jdalton
d560e2a558 Remove unused bar reFuncName. 2015-03-23 19:58:25 -07:00
jdalton
f914f080b1 Simplify ctor check flag in equalObjects. 2015-03-23 09:24:55 -07:00
jdalton
600a4e86e1 Ensure _.matches and _.matchesProperty work with function value params. 2015-03-23 09:24:05 -07:00
jdalton
e7b4ada65f Add _.restParam test for functions with more than 3 params. 2015-03-23 09:06:45 -07:00
jdalton
95f31be096 Add doc blocks for getFuncName and isLaziable. [ci skip] 2015-03-23 09:01:19 -07:00
jdalton
ad6db7eaae Adjust object checks in baseIsMatch, baseMatches, baseMatchesProperty, & isMatch. 2015-03-22 23:44:11 -07:00
jdalton
d7a99c6618 Add _.matches and _.matchesProperty tests for inherited properties. 2015-03-22 00:45:36 -07:00
jdalton
f20d8f5cc0 Loosen _.matches to match objects with inherited properties. [closes #1067] 2015-03-21 23:33:19 -07:00
jdalton
8930e6b393 Add baseWhile and createBaseEach. 2015-03-21 22:07:19 -07:00
jdalton
f26886acb0 Add createSortedIndex. 2015-03-21 18:08:35 -07:00
jdalton
820ab8d486 Add test for _.escapeRegExp with eval and Function. 2015-03-21 11:43:18 -07:00
jdalton
8e425fb358 Tweak _.at and _.matchesProperty doc examples. [ci skip] 2015-03-21 10:01:46 -07:00
jdalton
6006f499ac Fix doc bugs in _.runInContext, _.thru, _.forEachRight, & _.escapeRegExp. [closes #1065] [ci skip] 2015-03-21 10:01:17 -07:00
Christopher Venning
3caa740fc4 Fixed errors in documentation examples for _.trim, _.matchesProperty, & _.property. [ci skip] 2015-03-21 08:53:49 -07:00
jdalton
007ea9ea20 Add length check test to _.flow & _.flowRight. 2015-03-20 23:49:31 -07:00
jdalton
5d248d261d Expand part of shortcut fusion test. 2015-03-20 23:22:36 -07:00
jdalton
26908cba64 Don't assume a lodash method will exist. 2015-03-20 15:15:06 -07:00
jdalton
18d118746e Add _.fill doc example. [ci skip] 2015-03-20 12:37:49 -07:00
jdalton
9a633f5f2e Update root detection in WeakMap and Set shims. 2015-03-20 12:01:37 -07:00
jdalton
5aa44e98d5 Fix rhino and other old environment test fail. 2015-03-20 12:00:29 -07:00
jdalton
33916fa975 No need to redeclare funcName in createFlow. 2015-03-20 11:49:18 -07:00
jdalton
eab18df403 Cleanup isLaziable and getFuncNames. 2015-03-20 09:24:56 -07:00
jdalton
002caceb05 Cleanup isXyz methods. 2015-03-20 09:24:13 -07:00
jdalton
c250aa804a Ensure _.merge correctly coerces objects to arrays. [closes #1061] 2015-03-19 08:58:56 -07:00
jdalton
94ca50883f Drop funcDecomp optimization in baseCallback and ensure shortcut fusion for _.flow and _.flowRight works in minified builds. 2015-03-19 08:40:45 -07:00
jdalton
462c482873 Add support for shortcut fusion to _.flow and _.flowRight. 2015-03-18 10:27:45 -07:00
jdalton
e28e04a990 Add freeSelf as a fallback for when freeWindow is unavailable. 2015-03-17 20:13:10 -07:00
Rocco Nicosia
6438385d64 Fix _.zipObject docs to more clearly demonstrate it as _.pairs inverse. [ci skip] 2015-03-17 16:50:00 -07:00
jdalton
bfb08ce003 Use opposite instead of inverse to describe _.propertyOf. [ci skip] 2015-03-17 16:49:30 -07:00
jdalton
3590a06f40 Update _.zipObject docs to tie into _.pairs. [ci skip] 2015-03-17 16:45:01 -07:00
jdalton
23ca6c5e10 Rename createPad to createPadding and cleanup docs of pad methods. 2015-03-17 15:57:12 -07:00
jdalton
1aea5bcd50 Finish adding comment blocks to creator function. [ci skip] 2015-03-17 13:54:33 -07:00
jdalton
82c5d8ed28 Rename createComposer to createFlow. 2015-03-17 10:27:52 -07:00
jdalton
5dcd58a75f Tweak _.findIndex docs and correct _.findKey docs. [ci skip] 2015-03-17 10:23:59 -07:00
jdalton
dc605a4ee1 More more docs for creator functions. [ci skip] 2015-03-17 10:23:26 -07:00
Justin Ridgewell
fec940ab8b Allocate proper size in in _.restParam.
Since we're putting `rest` at `start` index, `array.length; // => {start + 1}`
2015-03-17 08:50:41 -07:00
jdalton
05fd7cecf4 Add docs for baseSum and arraySum. [ci skip] 2015-03-17 08:48:21 -07:00
jdalton
2f52730b48 Use and consistently. [ci skip] 2015-03-17 08:44:51 -07:00
jdalton
4c1819c7dd Ensure _.sum provides the correct arguments when iterating an object. 2015-03-15 19:49:14 -07:00
jdalton
c58c0df30e Cleanup creator functions. 2015-03-15 17:12:33 -07:00
jdalton
c5902b3144 Cleanup _.sum. 2015-03-15 17:01:40 -07:00
qsona
519eb424e7 Documentation nits. [ci skip] 2015-03-15 14:57:53 -07:00
qsona
03478afea4 Add support for _.sum to take iteratee. 2015-03-15 14:57:13 -07:00
jdalton
306ef8addf Add creator functions. 2015-03-15 14:48:32 -07:00
jdalton
d4659b261d Add baseFindIndex. 2015-03-15 11:22:25 -07:00
jdalton
69ce41807a Add _.restParam. 2015-03-15 10:57:21 -07:00
jdalton
cc81da5aa4 Update Chrome version in saucelabs.js. 2015-03-14 00:14:21 -07:00
jdalton
eee714f52b Add iteratee guard to _.includes. 2015-03-13 13:39:14 -07:00
jdalton
c976b637d8 Adjust test descriptions to be more generic. 2015-03-13 12:33:19 -07:00
jdalton
ea93515d53 Add well-known symbols test for _.uniq. 2015-03-13 09:03:09 -07:00
jdalton
652499bdcf Cleanup sortedIndex test. 2015-03-13 08:51:56 -07:00
Benjamin Tan
819862199a Documentation: Rename predicate to iteratee.
Closes #1049.
[ci skip]
2015-03-13 08:43:05 -07:00
jdalton
6c1bc1d7bb Semicolons out colons in. [ci skip] 2015-03-13 08:43:00 -07:00
octref
36ebe76e0a Fix _.reduce doc 2015-03-13 08:39:10 -07:00
Benjamin Tan
8f8d35dec7 Simplify test/saucelabs.js.
Remove repeated assignment operations.
2015-03-13 19:29:39 +08:00
jdalton
ac1e436339 Simplify isCommon and isCombo checks in mergeData. 2015-03-13 00:12:51 -07:00
jdalton
78d4812b0e Whitespace nits. [ci skip] 2015-03-12 23:02:23 -07:00
jdalton
6a1b7626e3 Add NaN tests for _.indexOf and _.lastIndexOf with a fromIndex. 2015-03-12 22:42:02 -07:00
bryce-gibson
b6ccb4c96f Add example of alternative _.zipObject syntax. [ci skip] 2015-03-12 07:41:15 -07:00
jdalton
9712ac550c Set metadata for curried lazy lodash methods. 2015-03-11 23:41:41 -07:00
jdalton
5b173766c6 Add symbol tests for _.isObject and _.uniq. 2015-03-11 20:52:34 -07:00
jdalton
b535c4f321 Optimize _.reduce and _.reduceRight. 2015-03-11 11:40:51 -07:00
jdalton
56c5ebcb71 Ensure the result of _.difference is based on the values of the first param only. [#1038] 2015-03-10 21:31:46 -07:00
jdalton
028234ba86 Update guard info in _.reduce docs. [ci skip] 2015-03-10 09:21:38 -07:00
jdalton
f063b4d231 Add isIterateeCall guards to _.every and _.some. [closes #1035] 2015-03-10 09:21:01 -07:00
Teoman Soygul
508f27cc32 Fix _.property documentation typo. [ci skip] 2015-03-10 08:44:54 -07:00
jdalton
d4783170e5 Minor cleanup of setting __actions__ in _.mixin. 2015-03-09 08:33:19 -07:00
jdalton
51e459b386 Bump to v3.5.0. 2015-03-08 17:57:42 -07:00
jdalton
1253d254af Rebuild lodash and docs. 2015-03-08 17:57:22 -07:00
jdalton
5e70574396 Add parentheses and cleanup more complex code snippets. 2015-03-08 17:45:53 -07:00
jdalton
b5dce2f74b Optimize createBindWrapper, createPartialWrapper, and createHybridWrapper. 2015-03-08 01:00:04 -08:00
jdalton
6113da3e68 Remove unneeded tests. 2015-03-07 23:27:21 -08:00
jdalton
faf6406289 Ensure lazy drop when applied after filter works correctly. [closes #1026] 2015-03-07 23:20:26 -08:00
jdalton
7c443431d9 Add private guard param doc to _.sortByOrder. [ci skip] 2015-03-07 11:11:24 -08:00
jdalton
0f201e3fd8 Add more chaining tests join, replace, & split. 2015-03-07 00:30:42 -08:00
jdalton
bf96c30187 Cleanup string methods added to LodashWrapper. 2015-03-07 00:23:17 -08:00
octref
eb1b7b914a Add split and replace to LodashWrapper. [closes #1016] 2015-03-06 23:11:52 -08:00
octref
135bc2de52 Adjust _.sortByOrder doc example to better show effect. [ci skip] 2015-03-06 12:02:30 -08:00
jdalton
ab2269717d Bump to v3.4.0. 2015-03-06 00:55:11 -08:00
jdalton
b5a42cfa75 Rebuild lodash and docs. 2015-03-05 23:01:16 -08:00
jdalton
6693416d0a Tweak _.isEmpty and _.size docs. [ci skip] 2015-03-05 22:59:18 -08:00
jdalton
9cdf013933 Ensure length hit of for lazy eval is checked on initial lazy call. [closes #997] 2015-03-05 22:50:16 -08:00
jdalton
1dfaa30520 Add inRange and sortByOrder to lodash doc notes. [ci skip] 2015-03-05 08:27:51 -08:00
jdalton
d898fcee75 Simplify the root assignment. 2015-03-05 07:41:22 -08:00
jdalton
1e647a2058 Rename test module for consistency. 2015-03-04 08:43:37 -08:00
jdalton
10e379d862 Add _.sortByOrder tests. 2015-03-04 08:43:37 -08:00
jdalton
ee456493c4 Remove argument unrolling in LazyWrapper assignments. 2015-03-04 08:43:37 -08:00
jdalton
69e9c7d0be Expand _.defaults test for working with _.reduce. 2015-03-04 08:43:37 -08:00
jdalton
adce718d63 Another cleanup pass on createAssigner. 2015-03-04 08:43:37 -08:00
jdalton
3a94a65f12 Tweak root assignment to work with webpack in a web worker. [closes ##313] 2015-03-04 08:43:37 -08:00
jdalton
bbe30db1b7 Avoid test fails for npm builds. 2015-03-03 12:13:48 -08:00
jdalton
68f3c43805 Add createComposer to reduce the definition of _.flow and _.flowRight. 2015-03-03 11:40:24 -08:00
jdalton
3c99ecda60 Move more code out of the try-block in _.attempt. 2015-03-03 11:40:24 -08:00
jdalton
b1366696c4 Simplify guard check in _.sortByAll. 2015-03-03 11:40:24 -08:00
jdalton
534aeb4065 Use args alias of arguments in _.difference, _.pull, & _.memoize. 2015-03-03 11:40:24 -08:00
jdalton
cc77a36dd9 Cleanup createAssigner. 2015-03-03 11:40:17 -08:00
jdalton
5991068fdf Add more lazy chaining tests. 2015-03-03 09:22:59 -08:00
octref
913778d5ab Let createAssigner get correct customizer
When `_.defaults` is invoked using `_.reduce` / `_.reduceRight`
`createAssigner` discards the customizer, so the effect is
`_.assign` but not `_.defaults`

```
_.reduce([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "fred"}
_.reduceRight([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "barney"}

// Fixed
_.reduce([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "barney"}
_.reduceRight([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "fred"}
```
2015-03-02 21:19:11 -08:00
h7lin
9a8345d4f9 Fix doc example in _.partition. [ci skip] 2015-03-02 20:25:29 -08:00
jdalton
ba9bd3bc76 Better match words with one character. [closes #1012] 2015-03-02 20:23:14 -08:00
jdalton
aad0070b77 Narrow new LodashWrapper to dropWhile. 2015-03-02 20:23:14 -08:00
jdalton
d192e69811 Break lazy chains before or . [closes #1011] 2015-03-02 09:19:05 -08:00
jdalton
ec8d919b93 Cleanup . 2015-03-02 09:17:16 -08:00
octref
4ce4f1d758 Add _.sortByOrder. 2015-03-01 14:04:00 -08:00
jdalton
3aa40d4df6 Simplify baseFlatten and always provide a fromIndex. 2015-03-01 01:22:38 -08:00
jdalton
ec1be41b62 Correct _.flatten benchmark. 2015-03-01 01:22:38 -08:00
jdalton
c15d81545a Update chalk in travis. 2015-03-01 01:22:38 -08:00
jdalton
1af8b9d16a Cleanup docs of _.flow, _.flowRight, _.defaults, _.range, _.inRange, & _.sum. [ci skip] 2015-02-28 21:12:10 -08:00
jdalton
d860cf834d Avoid testing the minified build on PRs in travis. 2015-02-28 19:18:38 -08:00
jdalton
63d5a3acbc Optimize baseIndexOf more consistently. 2015-02-28 12:42:14 -08:00
jdalton
132aacee89 Optimize lazy evaluation for 1 param. 2015-02-28 10:11:26 -08:00
jdalton
973038da6a Optimize baseIndexOf, indexOfNaN, and baseFlatten. 2015-02-27 21:43:30 -08:00
h7lin
584da3c39b Fix doc example in _.findLastIndex. [ci skip] 2015-02-27 19:56:12 -08:00
Mohsen Azimi
73c4829255 Escape the backtick in _.escape docs. [ci skip] 2015-02-27 19:56:06 -08:00
jdalton
68942f7ec4 Move _.max & _.min to Math category & make _.sum work on collections. 2015-02-27 09:20:57 -08:00
jdalton
e914b83a1b Add gitter badge to readme. [ci skip] [closes #983] 2015-02-27 08:26:09 -08:00
jdalton
2268376360 Update tested Firefox in saucelabs.js. 2015-02-26 19:41:22 -08:00
jdalton
6bb3b9a684 Disable lazy optimizations if the iteratee has more than one param. [closes #997] 2015-02-26 19:40:15 -08:00
jdalton
9f213c119c Add more chaining tests. 2015-02-25 23:35:16 -08:00
jdalton
f081e2b799 Cleanup _.sum tests. 2015-02-25 23:03:01 -08:00
jdalton
a024152c12 Add add and sum to lodash doc notes. [ci skip] 2015-02-25 23:01:50 -08:00
jdalton
42d23dbc70 Simplify _.sum. 2015-02-25 23:01:32 -08:00
John-David Dalton
74786e8a25 Merge pull request #987 from thejameskyle/math
Add math methods.
2015-02-25 19:00:06 -08:00
James Kyle
eeb4ede60d Add _.add/_.sum methods 2015-02-25 10:37:42 -08:00
Juliano Castilho
f2eee8896c Fix code example typo in _.dropRightWhile. [ci skip] 2015-02-25 00:19:53 -08:00
jdalton
bf4a70d91c Bump to v3.3.1. 2015-02-23 23:49:50 -08:00
jdalton
a35ab3937a Rebuild lodash and docs. 2015-02-23 23:49:40 -08:00
jdalton
5ef9a4be8a Ensure isIterateeCall doesn't error if index is an object without a toString method. [closes #994] 2015-02-23 23:48:49 -08:00
jdalton
d76d7582fe Simplify lazy filter, map, & takeWhile assignment. 2015-02-23 21:25:24 -08:00
jdalton
44006142c7 Ensure wait of _.debounce and _.throttle defaults to 0. [closes #991] 2015-02-23 08:28:20 -08:00
jdalton
6840b2cfe5 Consistent use of callCount variable. 2015-02-23 08:28:20 -08:00
jdalton
5613f60403 Ensure lazy takeWhile works with reverse and last`. [closes #990] 2015-02-23 02:05:09 -08:00
jdalton
76d3959f1a Use square in more places. 2015-02-23 01:26:07 -08:00
jdalton
b681759000 Remove unnecessary excused tests. 2015-02-23 00:35:24 -08:00
jdalton
d6336c4302 Fix code styling in _.template doc example. [ci skip] 2015-02-23 00:35:24 -08:00
jdalton
35b161450a Update benchmark and underscore vendor files. 2015-02-23 00:35:24 -08:00
jdalton
861aaf06c6 Optimize _.uniq and others in Firefox. 2015-02-23 00:35:23 -08:00
jdalton
a910884e7d Fix _.indexOf doc example typo. [closes #986] [ci skip] 2015-02-23 00:35:23 -08:00
Jarrett Meyer
0e7bef9014 Fixes missing single quotes in docs. [ci skip] 2015-02-23 00:35:23 -08:00
jdalton
d942189bc6 Bump to v3.3.0. 2015-02-23 00:35:23 -08:00
jdalton
eb16051b1e Rebuild lodash and docs. 2015-02-23 00:35:11 -08:00
jdalton
7749a7e41d Add gitter webhook to travis.yml. 2015-02-20 22:35:41 -08:00
jdalton
dc4cef17d4 Update ecstatic, istanbul, & sauce-tunnel in travis.yml. 2015-02-19 09:11:48 -08:00
jdalton
89ed40e4a4 Add _.merge. tests. 2015-02-19 00:14:59 -08:00
jdalton
10ee74d872 Cleanup clone tests. 2015-02-18 23:48:32 -08:00
jdalton
474ae1e91c Allow isDeep of _.clone to work with more truthy values. 2015-02-18 23:35:43 -08:00
jdalton
0dc70ca5f3 Semicolon nits. 2015-02-18 23:35:09 -08:00
jdalton
633b1663ca Tweak iteration methods test. 2015-02-18 23:22:03 -08:00
jdalton
153fe61b4b Avoid iterating strings in _.merge. [closes #978] 2015-02-18 21:05:39 -08:00
jdalton
9734fd0353 Increase _.merge test coverage. 2015-02-18 01:05:39 -08:00
jdalton
6209c120c0 Non-nits. 2015-02-18 01:03:53 -08:00
jdalton
3516881e7a Update tested Chrome in saucelabs.js. 2015-02-18 00:46:02 -08:00
jdalton
15398555b3 Ensure isIterateeCall works with NaN values. 2015-02-18 00:33:51 -08:00
jdalton
cb132fcbf4 Add more iteration method tests. 2015-02-18 00:03:50 -08:00
jdalton
f42f46c7d6 Adjust doc examples for smaller screens. [ci skip] 2015-02-17 10:08:38 -08:00
jdalton
f1046f1cf1 Consistent use of lodash when referencing a lodash wrapper. [ci skip] 2015-02-15 23:05:30 -08:00
jdalton
4a62287139 Cleanup baseLodash description. [ci skip] 2015-02-15 23:04:50 -08:00
jdalton
69cd56357f Tweak _.propertyOf usage example. [ci skip] 2015-02-15 22:42:16 -08:00
jdalton
b66a886682 Clarify _.noop docs. [ci skip] 2015-02-15 22:41:37 -08:00
jdalton
249504b7d6 Whitespace nits in docs. [ci skip] 2015-02-15 22:40:42 -08:00
jdalton
fa0086404d Add baseLodash. 2015-02-15 21:54:12 -08:00
Milos Zivadinovic
f243ebba91 Add _.inRange. 2015-02-15 18:01:05 -08:00
Austin Pray
540afb193b Fix type in _.some doc example. [closes #969] [ci skip] 2015-02-15 15:46:43 -08:00
jdalton
8294acdf1c Tweak null check tests of _.difference, _.intersection, _.union, & _.xor. 2015-02-15 00:37:18 -08:00
jdalton
7733d02938 Remove baseSlice from _.attempt. 2015-02-15 00:22:55 -08:00
jdalton
9b6342e7fa Add baseIsFunction. 2015-02-12 23:09:49 -08:00
jdalton
22c09cb31b Bump to v3.2.0. 2015-02-12 21:24:55 -08:00
jdalton
21e79cb54a Rebuild lodash and docs. 2015-02-12 21:24:48 -08:00
jdalton
b8cc829f4a Cleanup docs. [ci skip] 2015-02-12 21:13:45 -08:00
jdalton
ace0dacf15 Make baseMatches style consistent with baseMatchesProperty. 2015-02-12 20:18:26 -08:00
Graeme
5ca13098e3 Use predicate instead of iteratee. 2015-02-12 20:18:25 -08:00
jdalton
07b13eedec Cleanup _#plant and _.spread doc examples. [ci skip] 2015-02-12 12:47:54 -08:00
jdalton
d9168ed9ec Add proper jsdoc tags to _.fill. [ci skip] 2015-02-12 12:47:54 -08:00
jdalton
fb4e2c167c Add matchesProperty to lodash doc note. [ci skip] 2015-02-12 12:47:53 -08:00
jdalton
10ee3585f6 Fix spread doc and remove unused thisArg. 2015-02-12 01:59:16 -08:00
jdalton
5d4ba820dd Add _.matchesProperty shorthand tests. 2015-02-12 01:36:08 -08:00
jdalton
a51e00e69f Add _.matchesProperty tests. 2015-02-12 01:30:52 -08:00
jdalton
4dfa963851 Document "_.matchesProperty" shorthands. [ci skip] 2015-02-12 00:27:08 -08:00
jdalton
f2d4f6ccf6 Add _.matchesProperty. 2015-02-11 22:50:39 -08:00
jdalton
182cb8ab25 Simplify lazy pluck and where. 2015-02-11 22:50:22 -08:00
jdalton
ece341d868 Update android testing in saucelabs.js. 2015-02-11 20:25:25 -08:00
jdalton
d72e8c2687 Source cleanup from eslinting. 2015-02-11 20:25:13 -08:00
jdalton
b0ff6f4c7b Remove extraneous description from createAggregator docs. [ci skip] 2015-02-11 08:30:46 -08:00
jdalton
6ec5249492 Change intuitively to implicitly. 2015-02-11 08:29:41 -08:00
jdalton
c44cd76c5a Ensure commit and reverse track __chain__` settings. [closes #958] 2015-02-11 08:29:01 -08:00
jdalton
37f711d72a Adjust dep versions to better suite their range in package.json. 2015-02-11 00:15:11 -08:00
jdalton
fcf18fb965 Remove thisArg from _.spread. [closes #957] 2015-02-11 00:15:11 -08:00
jdalton
2efd6250fb Minor commit nit in test.js. [ci skip] 2015-02-11 00:15:11 -08:00
jdalton
1b4bd8523d Add _.slice assert. 2015-02-11 00:15:11 -08:00
jdalton
60c44910df Fix lazy slice when used after filter. [closes #955] 2015-02-11 00:15:03 -08:00
jdalton
faf67fae03 Update qunit to 1.17.1. 2015-02-10 20:16:27 -08:00
jdalton
e95f547950 Add doc notes on guarded methods. [ci skip] 2015-02-10 09:44:48 -08:00
jdalton
96b663b783 Ensure lazy slice handles floating-point start and end params. 2015-02-10 00:33:10 -08:00
jdalton
ce44f7e4b0 Add lazy compact and toArray. 2015-02-10 00:08:09 -08:00
jdalton
16a9c7d492 Improve label of unstable test. 2015-02-09 08:58:08 -08:00
jdalton
fc369c3448 Add _.fill and _.slice tests for default start and end params. 2015-02-09 08:39:09 -08:00
jdalton
b1a33edf0f Cleanup io.js testing in travis.yml. 2015-02-09 01:24:40 -08:00
jdalton
3b805f1a24 Rebuild lodash. 2015-02-09 01:14:55 -08:00
jdalton
954b4d8075 Add mutation note to _.fill docs. [ci skip] 2015-02-09 00:45:38 -08:00
jdalton
d073e2a881 Add _.fill to lodash docs. [ci skip] 2015-02-09 00:45:37 -08:00
jdalton
044dd2af94 Remove unneeded jsdoc Function type tags. [ci skip] 2015-02-09 00:45:37 -08:00
jdalton
ee489fa8c0 Cleanup tests. 2015-02-09 00:45:37 -08:00
jdalton
035ed5f49b Add _.fill. 2015-02-09 00:45:37 -08:00
jdalton
7dcd690f61 Add object test for _.max and _.min being used as an iteratee for _.map. 2015-02-09 00:45:37 -08:00
jdalton
1c9290aded Add _.includes, _.indexOf, _.lastIndexOf, _.map, _.mapValues, & a few other tests. 2015-02-09 00:45:37 -08:00
jdalton
0b922b1ed1 Move _.support tests to be in alphebetic API order. 2015-02-09 00:45:37 -08:00
jdalton
34eec362e5 Add methods to lodash docs. [ci skip] 2015-02-09 00:45:37 -08:00
jdalton
b829383864 Cleanup docs for _.callback. [ci skip] 2015-02-09 00:45:36 -08:00
jdalton
3960235428 Cleanup _.spread docs & tests. 2015-02-09 00:45:36 -08:00
Nicolas Chambrier
e91a662491 Add _.spread. 2015-02-09 00:45:36 -08:00
jdalton
ba4da24984 Add tests for arguments provided to callbacks of _.takeWhile and friends when in a lazy chain sequence. [closes #944] 2015-02-09 00:45:36 -08:00
jdalton
70378432b7 Minor cleanup of istanbul command in travis.yml. 2015-02-09 00:45:36 -08:00
jdalton
6b63009b14 Expand _.takeWhile, _.takeRightWhile, _.dropWhile, & _.dropRightWhile tests. 2015-02-09 00:45:36 -08:00
jdalton
dd45fea732 Add _#commit, _#plant, & _#run. 2015-02-09 00:45:36 -08:00
jdalton
ee09425cfb Simplify travis.yml. 2015-02-09 00:45:36 -08:00
jdalton
af02a1e024 Replace some _.isFunction checks with simple typeof checks and replace some typeof checks with _.isFunction checks based on likelihood of a problem value older enviros being passed. 2015-02-07 09:45:11 -08:00
jdalton
2a86f0776c Fix travis run. 2015-02-06 23:44:14 -08:00
jdalton
c6f73d9df8 Consistent apply(undefined, ...) use. 2015-02-06 23:14:03 -08:00
jdalton
5ab79f292b Allow _.attempt to provide additional arguments to func. [closes #929] 2015-02-06 23:09:52 -08:00
jdalton
82c7a22d27 Ensure _.flow and _.flowRight return an identity function when no arguments are provided. [closes #938] 2015-02-06 22:45:58 -08:00
jdalton
35fa977981 Update to Node.js 0.12 and simplify io.js install in travis.yml. 2015-02-06 21:57:08 -08:00
jdalton
ecbc46a91d Remove unused unshift variable. 2015-02-06 21:56:37 -08:00
jdalton
d2f6416e45 Add _.runInContext usage example to _.mixin docs. [ci skip] 2015-02-05 09:47:47 -08:00
jdalton
97a885a05c Use sauce-tunnel v2.1.1 to avoid hangs when closing tunnels. 2015-02-04 22:51:25 -08:00
jdalton
aa1edd6b94 Update tested io.js version in travis.yml. 2015-02-04 21:20:11 -08:00
jdalton
083e401717 Fix param doc typos in baseIsMatch, _.chunk, & _.isMatch. [ci skip] [closes #923] 2015-02-04 21:14:42 -08:00
jdalton
bdeca2edce Update .gitignore to ignore lodash.compat.min.js. [ci skip] 2015-02-04 21:14:42 -08:00
jdalton
c84e14db46 Bump to v3.1.0. 2015-02-04 21:14:42 -08:00
jdalton
919c5bd0b3 Rebuild lodash and docs. 2015-02-04 21:14:42 -08:00
jdalton
af8a8f1e3f Add spec note to isLength and update spec link for MAX_SAFE_INTEGER. [ci skip] 2015-02-04 21:14:42 -08:00
jdalton
41d08e123f Ensure isIterateeCall works correctly with objects. [closes #917] 2015-02-04 21:14:42 -08:00
jdalton
67d9656e35 Use baseProperty instead of _.property in more places. 2015-02-04 21:14:42 -08:00
jdalton
1a58a70494 Reduce deps on matches in favor of baseMatches. 2015-02-04 21:14:42 -08:00
jdalton
a477b2efd1 Add startCase to lodash docs. [ci skip] 2015-02-04 21:14:42 -08:00
jdalton
59c4546b8c Move _.startCase definition. 2015-02-04 21:14:42 -08:00
jdalton
ed1a75ef4c Add _.trunc test for floating-point lengths. 2015-02-04 21:14:42 -08:00
jdalton
0cd942f152 Cleanup case tests. 2015-02-04 21:14:41 -08:00
jdalton
fe7f082083 Cleanup case methods. 2015-02-04 21:14:41 -08:00
James Kyle
849fd71f76 Add _.startCase. 2015-02-04 21:14:41 -08:00
jdalton
4e3a72388d Add more lazy tests. 2015-02-04 21:14:41 -08:00
jdalton
29e3d9eff5 Bump to v3.0.1. 2015-02-04 21:14:31 -08:00
jdalton
64280f4285 Rebuild lodash and docs. 2015-02-04 21:14:02 -08:00
jdalton
98c6eaac3b Remove unneeded baseToString use. 2015-02-04 21:14:02 -08:00
jdalton
22d965c66c Add _.merge test for DOMExceptions for #895. 2015-02-04 21:14:01 -08:00
jdalton
2eb932ebc1 Add _.assign and _.merge test to ensure object isn't treated as source. 2015-02-04 21:14:01 -08:00
jdalton
2ee0634db3 Should coerce float start and end params of _.slice to integers. 2015-02-04 21:14:01 -08:00
jdalton
db3b6a1252 Add _.random tests. 2015-02-04 21:14:01 -08:00
jdalton
24810aeca3 Fix DOMException in _.merge. [closes #895] 2015-02-04 21:14:01 -08:00
jdalton
c888319f22 Fix lazy reverse and rest. [closes #890] 2015-02-04 21:14:01 -08:00
jdalton
13ee78a9c9 Remove baseToString use in baseCallback. 2015-02-04 21:14:01 -08:00
jdalton
acaa07cf7c Update docs. [ci skip] 2015-02-04 21:13:26 -08:00
Bjørn Madsen
1a3c9939e8 Fix Wikipedia link for kebabCase. 2015-02-04 21:13:26 -08:00
jdalton
56afe21022 Fix doc typo in _.memoize. [ci skip] 2015-02-04 21:13:26 -08:00
jdalton
b58bfa82e6 Fix doc example for _.forEach. [ci skip] 2015-02-04 21:13:26 -08:00
jdalton
a6257b5901 Bump to v3.0.0. 2015-02-04 21:13:20 -08:00
John-David Dalton
16ad7e53ff Update docs. [ci skip] 2015-02-02 23:05:17 -08:00
jdalton
3e4e4f2664 Rebuild lodash. 2015-02-02 23:05:17 -08:00
jdalton
dc0c4fe8fb Add tests for methods that check for functions and throw. 2015-02-02 23:05:17 -08:00
jdalton
0c050bb266 Add _.uniq test for arguments provided to iteratee. 2015-02-02 23:05:16 -08:00
jdalton
47a5b227cc Ensure _.ary treats negative n values as 0. 2015-02-02 23:05:16 -08:00
jdalton
ed61d0c591 Cleanup tests. 2015-02-02 23:05:16 -08:00
jdalton
8ff856ecf8 Use https in links where supported. [ci skip] 2015-02-02 23:05:16 -08:00
jdalton
93a607bea0 Reduce test hint for stable sort to match the commented issue. 2015-02-02 23:05:16 -08:00
jdalton
7bec7ba49d Rename Lo-Dash references to lodash. [ci skip] 2015-02-02 23:05:16 -08:00
jdalton
4c8f3bd392 Update travis.yml. 2015-02-02 23:05:16 -08:00
John-David Dalton
74ba9eb159 Update tested version of Firefox in saucelabs.js. 2015-02-02 23:05:16 -08:00
jdalton
d28ca4eda7 Rename ES6 to ES in tests. 2015-02-02 23:05:16 -08:00
jdalton
9563b5a7df Change ES6 references to ES. [ci skip] 2015-02-02 23:05:16 -08:00
John-David Dalton
d3a049c6e0 Update readme.md. 2015-02-02 23:05:16 -08:00
John-David Dalton
a52a3eb42f Update tested io.js version in travis.yml. 2015-02-02 23:05:15 -08:00
John-David Dalton
c54b21a754 Cleanup contributing.md. [ci skip] 2015-02-02 23:05:15 -08:00
John-David Dalton
cc8995cd5c Remove Underscore build from readme. [ci skip] 2015-02-02 23:05:15 -08:00
John-David Dalton
2e222fbae2 Minor doc whitespace nits. [ci skip] 2015-02-02 23:05:15 -08:00
John-David Dalton
cdf3b15336 Use baseToString in more places. 2015-02-02 23:05:15 -08:00
John-David Dalton
a9a95de02d Use baseToString in _.repeat. 2015-02-02 23:05:15 -08:00
John-David Dalton
d4bcd4ab0c Rename toString helper to baseToString to avoid conflict with aliases. 2015-02-02 23:05:15 -08:00
John-David Dalton
3b2ed06864 Update bower.json and component.json. 2015-02-02 23:05:15 -08:00
John-David Dalton
ab210b3988 Use install shorthand consistently in readme. [ci skip] 2015-02-02 23:05:15 -08:00
John-David Dalton
70617be903 Use Object.create(null) in SetCache. 2015-02-02 23:05:15 -08:00
John-David Dalton
f039d5bbcb Update lodash script reference in perf/index.html. 2015-02-02 23:05:15 -08:00
John-David Dalton
e0adb3cf9a Update tested enviros. [ci skip] 2015-02-02 23:05:15 -08:00
John-David Dalton
4dd6e07b8d Change description. [ci skip] 2015-02-02 23:05:15 -08:00
John-David Dalton
d69b7951e0 Remove author & contributors notes from readme. [ci skip] 2015-02-02 23:05:15 -08:00
John-David Dalton
d915ece2e7 Use baseClone & keys instead of baseAssign. 2015-02-02 23:05:14 -08:00
John-David Dalton
f1be3df112 Rename params of arrayCopy and baseCopy. 2015-02-02 23:05:14 -08:00
John-David Dalton
29b7ca4c25 Switch condition order. 2015-02-02 23:05:14 -08:00
John-David Dalton
f478d916aa Doc cleanup. [ci skip] 2015-02-02 23:05:14 -08:00
John-David Dalton
d2e50b09db Rename toString to objToString. 2015-02-02 23:05:14 -08:00
John-David Dalton
23c2dd33f2 Remove unnecessary _.toPlainObject test. 2015-02-02 23:05:14 -08:00
John-David Dalton
ce0c3c935c Remove unnecessary phantomjs guards. 2015-02-02 23:05:14 -08:00
John-David Dalton
bdbafb7a2a Treat arguments objects like plain objects. 2015-02-02 23:05:14 -08:00
John-David Dalton
edffe2a6fc Fix tests in phantomjs. 2015-02-02 23:05:14 -08:00
John-David Dalton
cd69a53406 Guard against nullish value being passed to arrayCopy in baseMergeDeep. 2015-02-02 23:05:14 -08:00
John-David Dalton
439ffa5849 Updated tested version of io.js. 2015-02-02 23:05:14 -08:00
John-David Dalton
4518c30cbe Fix test fails. 2015-02-02 23:05:13 -08:00
John-David Dalton
6683809447 Adjust handling of typed arrays and arguments objects in baseMergeDeep. 2015-02-02 23:05:13 -08:00
John-David Dalton
cccd43a16b Add _.merge tests for arguments objectd and typed arrays. 2015-02-02 23:05:13 -08:00
John-David Dalton
91d44147bb Allow io.js to build files for tests in travis.yml. 2015-02-02 23:05:13 -08:00
John-David Dalton
777311bbf5 Update falsey arguments assert count. 2015-02-02 23:05:13 -08:00
John-David Dalton
9ded5dc78d Minor stye nit in _.isEqual test. 2015-02-02 23:05:13 -08:00
John-David Dalton
5b81c4573c Cleanup test titles. 2015-02-02 23:05:13 -08:00
John-David Dalton
32b2e9f6cf Add _.isTypedArray tests. 2015-02-02 23:05:13 -08:00
John-David Dalton
a6dba44561 Add tests for _.toPlainObject. 2015-02-02 23:05:13 -08:00
John-David Dalton
03fc317a3f Tweak _.findLastKey doc. [ci skip] 2015-02-02 23:05:13 -08:00
John-David Dalton
00a8130201 Fix typo in baseMergeDeep. 2015-02-02 23:05:13 -08:00
John-David Dalton
74fc15cccd Move isIndex into runInContext. 2015-02-02 23:05:13 -08:00
John-David Dalton
1d4d919f6d Move tag references higher in source. 2015-02-02 23:05:12 -08:00
John-David Dalton
1826cc8870 Cleanup _.isPlainObject docs. [ci skip] 2015-02-02 23:05:12 -08:00
John-David Dalton
8a6dab03c4 Tighten isIndex and isIterateeCall. 2015-02-02 23:05:12 -08:00
John-David Dalton
dffad444c3 Rearange key and mergeFunc param. 2015-02-02 23:05:12 -08:00
John-David Dalton
d6f1b164f7 Optimize object path in baseMergeDeep. 2015-02-02 23:05:12 -08:00
John-David Dalton
4011f054d6 Use isLength in baseIsEqualDeep. 2015-02-02 23:05:12 -08:00
John-David Dalton
14e9978359 Correct _.toPlainObject docs & add examples. [ci skip] 2015-02-02 23:05:12 -08:00
John-David Dalton
98535638a2 Update doc examples of _.isPlainObject, _.toArray, _.forIn, _.forInRight, _.keys, _.keysIn, _.values, & _.valuesIn. [ci skip] 2015-02-02 23:05:12 -08:00
John-David Dalton
8861c04e77 Update lodash docs. [ci skip] 2015-02-02 23:05:12 -08:00
John-David Dalton
42b6f320d8 Fix _.isTypedArray docs. [ci skip] 2015-02-02 23:05:12 -08:00
John-David Dalton
31b4a9197f Simplify arrayToObject. 2015-02-02 23:05:12 -08:00
John-David Dalton
f06c9d5b9b Move _.toArray and _.toPlainObject to the Lang category. 2015-02-02 23:05:12 -08:00
John-David Dalton
130fafd7c2 Add baseMergeDeep. 2015-02-02 23:05:11 -08:00
John-David Dalton
e76f79cd56 Doc tweaks to baseIsEqualDeep, equalArrays, & equalObjects. 2015-02-02 23:05:11 -08:00
John-David Dalton
ba21718cb9 Whitespace nits and cleanup. 2015-02-02 23:05:11 -08:00
John-David Dalton
6dfb2997cb Cleanup baseMerge. 2015-02-02 23:05:11 -08:00
John-David Dalton
ae9ac3b439 Add _.toPlainObject. 2015-02-02 23:05:11 -08:00
John-David Dalton
d70b5a9886 Add baseCopy. 2015-02-02 23:05:11 -08:00
John-David Dalton
fb2a20201c Remove isArrayLike helper. 2015-02-02 23:05:11 -08:00
John-David Dalton
d1761558b4 Rename argsToObject to arrayToObject and cleanup arrayCopy. 2015-02-02 23:05:11 -08:00
John-David Dalton
5bd0a53edd Doc cleanup. [ci skip] 2015-02-02 23:05:11 -08:00
John-David Dalton
53ea73238a Cleanup baseIsEqualDeep. 2015-02-02 23:05:11 -08:00
John-David Dalton
28560cb887 Add _.isTypedArray. 2015-02-02 23:05:11 -08:00
John-David Dalton
0bcd12aa4e Add iojs to travis.yml. 2015-02-02 23:05:11 -08:00
John-David Dalton
a7dfdebed6 Rebuild lodash. 2015-02-02 23:05:10 -08:00
John-David Dalton
aca07530aa Ensure _.sortByAll iteratee call guard works when _.partialRight is applied. 2015-02-02 23:05:10 -08:00
John-David Dalton
c0110c6bab Reduce doc example for _.assign and _.defaults. [ci skip] 2015-02-02 23:05:10 -08:00
John-David Dalton
0ef9e0fa75 Reduce keywords in component.json. [ci skip] 2015-02-02 23:05:10 -08:00
John-David Dalton
ba0751917d Update urls in contributing.md. [ci skip] 2015-02-02 23:05:10 -08:00
John-David Dalton
e3c1bfbcba Update build detection in saucelabs.js. 2015-02-02 23:05:10 -08:00
John-David Dalton
5aaa0a7b5f Update isModularize and isStrict detection. 2015-02-02 23:05:10 -08:00
John-David Dalton
2ca75970c0 Don't require building for run-test.sh. 2015-02-02 23:05:10 -08:00
John-David Dalton
d9c92288be Update contributing.md. [ci skip] 2015-02-02 23:05:10 -08:00
jdalton
e4f231502a Move _lodash.js to lodash.js. 2015-02-02 23:05:10 -08:00
jdalton
04a61e6fd6 Move lodash.js to lodash.src.js. 2015-02-02 23:04:56 -08:00
jdalton
dc5c7d2ee8 Move lodash.src.js to _lodash.js. 2015-02-02 23:02:47 -08:00
John-David Dalton
87ac6812a3 Update repo structure. 2015-01-10 11:08:20 -08:00
John-David Dalton
8d4d2d62c1 Remove clonePassthru. 2015-01-10 11:08:08 -08:00
John-David Dalton
68fc036b7a Fix test fail in non-browsers. 2015-01-09 19:11:45 -08:00
John-David Dalton
f053c4d532 Update lodash-compat-dev path. 2015-01-09 09:43:54 -08:00
John-David Dalton
06e4a2dbde Add initCloneByTag and adjust how unclonables are handled. 2015-01-09 09:43:54 -08:00
John-David Dalton
9e0ecab0c1 Move like functions closer together. 2015-01-08 00:11:33 -08:00
John-David Dalton
996e61a383 Make bower.json main reference lodash.compat.js. [ci skip] 2015-01-08 00:10:47 -08:00
John-David Dalton
309aa4a3f3 Minor perf/index.html tweak. 2015-01-07 21:16:49 -08:00
John-David Dalton
0906fbf995 Correct benchmark titles for _.includes. 2015-01-07 21:16:49 -08:00
John-David Dalton
2348ec40ee Add arrayCopy and use baseSlice in more functions. 2015-01-07 21:16:41 -08:00
John-David Dalton
c6852f4b96 Remove index.js. 2015-01-07 16:49:57 -08:00
John-David Dalton
8b01139738 Change project structure. 2015-01-07 09:33:46 -08:00
John-David Dalton
5ea3717152 Rebuild dist. 2015-01-06 09:06:41 -08:00
John-David Dalton
d01a673adb Update copyright year. [ci skip] 2015-01-06 09:03:07 -08:00
John-David Dalton
571ec44c33 Cleanup tests. 2015-01-05 23:04:20 -08:00
John-David Dalton
e5a3c12026 Add _.invoke test for missing properties. 2015-01-05 23:04:20 -08:00
John-David Dalton
bb2f1aa4be Expand _.runInContext doc examples. 2015-01-05 23:04:20 -08:00
John-David Dalton
59070bcd5b Simplify falsey string checks. 2015-01-05 23:04:20 -08:00
John-David Dalton
2f52dd88a9 Fix doc typo in arrayEvery and baseEvery. [ci skip] 2015-01-05 23:04:20 -08:00
John-David Dalton
79fec3ac40 Cleanup doc "returns" for _.assign, _.size, _.defaults, & _.merge. [ci skip] 2015-01-05 23:04:19 -08:00
John-David Dalton
6247bbf4b1 Cleanup customizer callback & callback shorthand docs. [ci skip] 2015-01-05 23:04:19 -08:00
John-David Dalton
11de155432 Chain methods by reference instead of property. 2015-01-04 16:55:09 -06:00
John-David Dalton
bfe833c132 Tweak _.drop, _.dropRight, _.take, & _.takeRight doc examples. [ci skip] 2015-01-04 16:55:09 -06:00
John-David Dalton
1fd1da72f4 Cleanup bower.json. 2015-01-04 16:55:09 -06:00
John-David Dalton
f4c994d182 Simplify package.json for non-npm use. 2015-01-04 16:55:09 -06:00
John-David Dalton
d81a6e6e89 Add more tested strings to the case methods. 2015-01-03 01:22:54 -06:00
John-David Dalton
fab5daacf8 Tweak string method doc examples. [ci skip] 2015-01-03 01:22:54 -06:00
John-David Dalton
b714c6b746 Update _.template sourceURLs to display better in Firefox. 2015-01-03 01:22:53 -06:00
John-David Dalton
af1355a94e Clarify customizer args in docs for _.clone, _.cloneDeep, _.isEqual, & _.isMatch. [ci skip] 2015-01-03 01:22:53 -06:00
John-David Dalton
ebc08fd6f5 Add _.parseInt used with _.map doc example. [ci skip] 2015-01-03 01:22:53 -06:00
John-David Dalton
30b1445195 Add ES6 notes to _.keys, _.keysIn, _.values, & _.valuesIn. [ci skip] 2015-01-03 01:22:43 -06:00
John-David Dalton
0d1c7a1414 Add _.memoize.Cache doc example. [ci skip] 2015-01-02 16:50:26 -06:00
John-David Dalton
7e8e7757f4 Update features and support sections of readme. [ci skip] 2015-01-02 16:50:26 -06:00
John-David Dalton
42eb180b6c Avoid unnecessary coercion of radix in _.parseInt. 2015-01-02 10:58:17 -06:00
John-David Dalton
dff35bc9b7 Cleanup _.mixin. 2015-01-02 10:58:17 -06:00
John-David Dalton
6a87ed2853 Tweak options detection in _.trunc. 2015-01-02 10:58:16 -06:00
John-David Dalton
1266d49c65 Minor tweak to condition in _.zipObject. 2015-01-02 10:58:16 -06:00
John-David Dalton
c8b130b232 Cleanup createWrapper. 2015-01-01 19:46:59 -06:00
John-David Dalton
67a6b0f383 Cleanup .gitignore. [ci skip] 2015-01-01 19:46:59 -06:00
John-David Dalton
e7c176f904 Fix typo in toString docs. [ci skip] 2014-12-31 18:35:14 -06:00
John-David Dalton
4cc8363b5f Replace [[Class]] with tag references in tests. 2014-12-31 11:34:44 -06:00
John-David Dalton
93193d7e76 Comment cleanup. [ci skip] 2014-12-31 11:34:13 -06:00
John-David Dalton
d68321ac27 Change [[Class]] references to ES6 tag and add toString helper. 2014-12-31 11:13:33 -06:00
John-David Dalton
b2e8359d31 Add more isLength tests. 2014-12-31 09:11:12 -06:00
John-David Dalton
a302ca3d6c Use a nullish check in _.startsWith instead of typeof. 2014-12-31 00:43:18 -06:00
John-David Dalton
670358f235 Make isLength return false for floats. 2014-12-31 00:42:45 -06:00
John-David Dalton
10e329f762 Add _.sortedIndex benchmark. [ci skip] 2014-12-30 21:16:07 -06:00
John-David Dalton
6a3c1bdb99 Fix strict mode test fail for es6 builds. 2014-12-30 21:06:35 -06:00
John-David Dalton
90923c965b Various doc cleanup. [ci skip] 2014-12-30 18:39:25 -06:00
John-David Dalton
d555241d03 Cleanup createExtremum. 2014-12-30 18:37:45 -06:00
John-David Dalton
3d2b6b7620 Rename baseBinaryIndex to binaryIndexBy. 2014-12-30 18:21:44 -06:00
John-David Dalton
0b943b418c Add createExtremum and extremumBy to reduce _.max and _.min. 2014-12-30 18:20:22 -06:00
John-David Dalton
db12aaad11 Adjust getCallback use in _.max, _.min, _.sortedIndex, & _.sortedLastIndex. 2014-12-30 11:03:47 -06:00
John-David Dalton
860aa65d10 Merge pull request #842 from bezoerb/debounce-doc-fix
Fixed documentation for debounce. [ci skip]
2014-12-29 08:24:56 -06:00
John-David Dalton
2e5e279a14 Minor _.where test cleanup. 2014-12-29 01:33:00 -06:00
John-David Dalton
df87b9ff56 Add _.transform tests. 2014-12-29 01:33:00 -06:00
John-David Dalton
6c06ff3ca0 Fix skipTest typos. 2014-12-29 01:32:48 -06:00
John-David Dalton
40d6e9c841 Add tests for custom _.callback implementations. 2014-12-28 17:23:27 -06:00
John-David Dalton
6a4f06f325 Make _.omit and _.pick use bindCallback. 2014-12-28 17:21:32 -06:00
John-David Dalton
f7d306cb02 Let the nullish check be handled by baseCallback. 2014-12-28 17:21:13 -06:00
Ben Zörb
34bc182c22 Fixed documentation for debounce 2014-12-28 22:42:28 +01:00
John-David Dalton
3f8dd7e658 Add test for customizer results of NaN. 2014-12-27 23:09:56 -06:00
John-David Dalton
46341fea96 Ensure _.merge handles source arrays with undefined values correctly with a customizer. 2014-12-27 22:11:47 -06:00
John-David Dalton
4319cdbba1 Fix failing Backbone test and ensure _.assign works properly with a customizer that returns undefined. 2014-12-27 21:14:12 -06:00
John-David Dalton
3453236830 Adjust how tests are skipped in loops so values may be added without adjusting the skip counts. 2014-12-27 20:27:17 -06:00
John-David Dalton
fa2058ec77 Ensure _.assign and _.merge don't assign the customizer result if it is the same as the destination value. 2014-12-27 19:42:10 -06:00
John-David Dalton
7f823fe2a8 Minor comment format nit. [ci skip] 2014-12-27 00:39:39 -06:00
John-David Dalton
58e14705b5 Rebuild dist. 2014-12-26 22:17:59 -06:00
John-David Dalton
99b7613206 Clarify _.isEmpty doc. [ci skip] 2014-12-26 22:15:57 -06:00
John-David Dalton
545e614c04 Cleanup isBindable. 2014-12-26 21:39:37 -06:00
John-David Dalton
5ea04a388d Change setCallbackData to isBindable and use bindCallback more. 2014-12-26 21:39:37 -06:00
John-David Dalton
8922372f4b Make _.unzip use baseProperty. 2014-12-26 21:39:37 -06:00
John-David Dalton
ceaa2c1619 Add bindCallback and setCallbackData. 2014-12-26 21:39:36 -06:00
John-David Dalton
4e73daab79 Add getLength, baseProperty, and baseMatches. 2014-12-26 21:39:36 -06:00
John-David Dalton
5b29d987c8 Use arrayMax and arrayMap instead of _.max and _.pluck in _.unzip. 2014-12-23 18:25:26 -06:00
John-David Dalton
1cd53c051d Update tested version of RingoJS. 2014-12-23 17:44:53 -06:00
John-David Dalton
5460d0030f Remove php from .editorconfig. [ci skip] 2014-12-23 17:44:53 -06:00
John-David Dalton
d14a0ce592 Use isLength in _.keys, _.keysIn, and shimKeys. 2014-12-22 12:26:16 -06:00
Benjamin Tan
a4000a3286 README.md: Update links to npm and minor cleanup. [ci skip] 2014-12-22 11:46:03 -06:00
Benjamin Tan
85fd650f5c More comment updates
[ci skip]
2014-12-22 11:46:03 -06:00
John-David Dalton
b19033a375 Add _.runInContext test for _.uniqueId counter. 2014-12-22 11:46:03 -06:00
John-David Dalton
33e19ce9f6 Reduce deps of _.template. 2014-12-21 23:17:34 -06:00
John-David Dalton
d21218fd57 Make use of changed baseValues signature. 2014-12-21 23:17:34 -06:00
John-David Dalton
9f2279c675 Make baseValues accept props instead of a keysFunc. 2014-12-21 23:17:34 -06:00
John-David Dalton
06bfbfaff4 Rename isWhitespace to isSpace. 2014-12-21 23:17:34 -06:00
John-David Dalton
562834e0d0 Use https for Benjamin's site url. [ci skip] 2014-12-21 23:17:34 -06:00
John-David Dalton
bdf2285f14 Remove Object.create use. 2014-12-21 21:31:56 -06:00
Benjamin Tan
1780682a8d Minor comment updates
[ci skip]
2014-12-21 21:03:55 -06:00
John-David Dalton
9b48bd27dd Ajust tests for npm build modifications. 2014-12-21 21:03:55 -06:00
John-David Dalton
0b1e2a6107 Add test for _.noConflict. 2014-12-21 21:03:55 -06:00
John-David Dalton
c78edf3fff Remove "always" from test titles. 2014-12-21 21:03:55 -06:00
John-David Dalton
6fcd99c6da Adjust test for builds without noConflict. 2014-12-21 21:03:55 -06:00
John-David Dalton
b42f3a5400 Ensure _.isMatch handle customizer functions correctly. 2014-12-20 20:00:58 -06:00
John-David Dalton
bb543920a6 Update Underscore version in LICENSE.txt. [ci skip] 2014-12-20 20:00:58 -06:00
John-David Dalton
0845758023 Add isMatch to lodash doc. [ci skip] 2014-12-20 17:42:45 -06:00
John-David Dalton
816f81260a Tweak _.matches docs. [ci skip] 2014-12-20 16:59:50 -06:00
John-David Dalton
a9583f4440 Cleanup tests. 2014-12-20 16:56:43 -06:00
John-David Dalton
4e52c9cc65 Add _.isMatch tests. 2014-12-20 16:56:43 -06:00
John-David Dalton
8299dded0b Remove default false from param docs. [ci skip] 2014-12-20 16:56:42 -06:00
John-David Dalton
5d83cafc50 Add baseIsMatch and _.isMatch. 2014-12-20 16:56:42 -06:00
John-David Dalton
9819e60aae Update Chrome extension doc link. [ci skip] 2014-12-20 16:56:42 -06:00
John-David Dalton
1182eb4a9f Remove unneeded partial use to reduce deps. 2014-12-20 16:56:42 -06:00
John-David Dalton
48a0986c14 Move idCounter into runInContext. 2014-12-20 16:56:42 -06:00
John-David Dalton
6c2f7046d1 Consolidate sortedIndex method tests and add one for array of undefined. 2014-12-20 16:56:42 -06:00
John-David Dalton
9735bffae5 Cleanup length checks. 2014-12-20 16:56:42 -06:00
John-David Dalton
56a11910db Remove _.identity from binaryIndex. 2014-12-17 23:57:06 -08:00
John-David Dalton
70b00dc4e3 Cleanup doc formatting. [ci skip] 2014-12-17 23:39:51 -08:00
John-David Dalton
56c1bf01a4 Ensure trim methods and _.words work as an iteratee for _.map with string objects. 2014-12-17 20:35:54 -08:00
John-David Dalton
022b295aaa Make _.indexOf and _.lastIndexOf used binaryIndex instead of _.sortedIndex and _.sortedLastIndex. 2014-12-17 20:35:54 -08:00
John-David Dalton
fd977895ab Tweak docs for _.after. [ci skip] 2014-12-17 20:35:54 -08:00
John-David Dalton
ad1f3ddbad Update Chrome and Firefox versions tested by Sauce. 2014-12-17 20:35:53 -08:00
John-David Dalton
c8b159e38c Reorg method categories. 2014-12-17 00:42:16 -08:00
John-David Dalton
7405e3c12a Simplify methods like _.defer and _.once. 2014-12-15 19:28:10 -08:00
John-David Dalton
1b8ca164c9 Increase code coverage. 2014-12-15 17:42:55 -08:00
John-David Dalton
74cdaa9fcb Clarify _.pick and _.omit docs. [ci skip] [closes #826] 2014-12-15 17:42:55 -08:00
John-David Dalton
0ba331485a Cleanup _.isEqual benchmarks. 2014-12-15 17:42:54 -08:00
John-David Dalton
f5b3c0affc Fix QUnit hidepass display. 2014-12-15 17:42:54 -08:00
John-David Dalton
316ae0c785 Update qunit-extras and backbone test to work with QUnit 1.16.0. 2014-12-15 17:42:54 -08:00
John-David Dalton
c2d2fa2579 Add more large array tests for sortedIndex methods. 2014-12-15 17:42:54 -08:00
John-David Dalton
d683eb2dd1 Reorg data merged by mergeData and remove dead code. 2014-12-14 19:30:53 -08:00
John-David Dalton
470d35e96c Simplify equalObjects. 2014-12-14 19:30:53 -08:00
John-David Dalton
7464d82243 Fix test fails in old IE. 2014-12-14 13:03:56 -08:00
John-David Dalton
c61fed32db Fix failing Rhino and Ringo tests. 2014-12-14 11:03:29 -08:00
John-David Dalton
c4cdec5531 Fix circular dep reference of baseIsEqual. 2014-12-14 10:40:10 -08:00
John-David Dalton
3ad9d38063 Add argsToObject, baseIsEqualDeep, equalArrays, equalByClass, and equalObjects helpers. 2014-12-14 10:31:48 -08:00
John-David Dalton
f8b95abf0c Add @d10 to the contributors list. 2014-12-13 23:33:06 -08:00
John-David Dalton
579794666a Update QUnit to 1.16.0. 2014-12-13 23:32:58 -08:00
John-David Dalton
2ef25b6338 Cleanup baseBinaryIndex and _.pull. [ci skip] 2014-12-12 22:49:30 -08:00
John-David Dalton
faddd94518 Add more large array tests for sortedIndex methods. 2014-12-11 09:03:24 -08:00
John-David Dalton
cd5f9b8bd4 Update _.result to execute default values if they're functions. 2014-12-11 07:05:09 -08:00
John-David Dalton
94fd20e864 Minor lodash doc nit. [ci skip] 2014-12-11 07:05:09 -08:00
John-David Dalton
3558eef66b Cleanup tests. 2014-12-11 07:05:03 -08:00
John-David Dalton
ee66e2154d Allow sourceURL option of _.template to be falsey. 2014-12-10 23:10:24 -08:00
John-David Dalton
5500a86f0b Add _.pluck test for undefined properties. 2014-12-09 23:39:08 -08:00
John-David Dalton
9b1c1774cd Expand _.assign doc example. [closes #819] [ci skip] 2014-12-09 23:33:41 -08:00
John-David Dalton
a8e31469c5 Optimize baseIsEqual for arrays. 2014-12-09 23:33:33 -08:00
John-David Dalton
b70bafaf51 Rename baseSortedIndex and edgeSortedIndex to binaryIndex and baseBinaryIndex respectively. 2014-12-09 21:32:17 -08:00
John-David Dalton
d393349b4d Add _.invoke tests. 2014-12-09 09:19:41 -08:00
John-David Dalton
0904724694 Tweak _.includes test. 2014-12-09 08:56:13 -08:00
John-David Dalton
eff4825000 Optimize _.escape, _.escapeRegExp, and _.unescape. 2014-12-09 08:55:48 -08:00
John-David Dalton
091c00229a Add edgeSortedIndex. 2014-12-09 08:34:13 -08:00
John-David Dalton
126f0d6036 Add more chaining docs. [ci skip] 2014-12-07 22:45:11 -08:00
John-David Dalton
f99bc6d8f9 Remove doc note for deep defaults. [ci skip] 2014-12-07 22:44:48 -08:00
John-David Dalton
3da0117838 Rebuild dist. 2014-12-07 09:31:47 -08:00
John-David Dalton
3d8cf6a90b Update vendors. 2014-12-07 00:00:12 -08:00
John-David Dalton
ac44663f04 Update lodash urls in source to use https. [ci skip] 2014-12-06 23:50:32 -08:00
John-David Dalton
57113b21ed Update readme with new entries and examples. [ci skip] 2014-12-06 15:09:32 -08:00
John-David Dalton
57d5ace61c Add _.ary tests. 2014-12-06 15:06:03 -08:00
John-David Dalton
f4da80e7c6 No need to assign the rusult of mergeData. 2014-12-06 14:40:47 -08:00
John-David Dalton
df3ca5c7c8 Fix _.ary unit test fail in old IE. 2014-12-06 14:36:23 -08:00
John-David Dalton
4b676df37f Move merge logic to mergeData. 2014-12-06 14:23:49 -08:00
John-David Dalton
5dc04266ea Update chaining docs. [ci skip] 2014-12-06 13:23:39 -08:00
John-David Dalton
dbcfe3f5d2 Add internal isObjectLike. 2014-12-06 13:12:03 -08:00
John-David Dalton
fdbec5b0d2 Allow metadata to be used for curried functions that have _.ary and or _.rearg applied. 2014-12-06 10:48:48 -08:00
John-David Dalton
3ea129b4f8 Add icon field to package.json and update Mathias' website url. 2014-12-05 00:15:18 -08:00
John-David Dalton
48a7e40520 Add _.ary. [closes #814] 2014-12-05 00:13:30 -08:00
John-David Dalton
08b956cf88 Adust code example in readme. [ci skip] [closes #811] 2014-12-02 23:43:28 -08:00
John-David Dalton
93b1e1f5ac Add placeholder docs. [ci skip] 2014-12-02 23:41:41 -08:00
John-David Dalton
bdecf6baf5 Cleanup test titles. 2014-12-01 22:21:47 -08:00
John-David Dalton
4528311d77 Add _.create and _.includes tests. 2014-12-01 22:20:41 -08:00
John-David Dalton
0bc1761dae Update ecstatic in travis.yml. 2014-12-01 01:09:04 -08:00
John-David Dalton
f690b0edf6 Update dev deps. 2014-11-30 22:20:29 -08:00
John-David Dalton
10851772af Fix paths in test.js. 2014-11-30 19:45:35 -08:00
John-David Dalton
66e7b28195 Use _.include instead of _.includes in perf.js for Underscore compat. 2014-11-30 19:42:23 -08:00
John-David Dalton
76021fb582 Move some vendors to devDependencies. 2014-11-30 19:41:52 -08:00
John-David Dalton
db50adbd9f Cleanup and add "Mobile" note to Safari 8 JIT bug test. [ci skip] 2014-11-29 10:08:53 -08:00
John-David Dalton
5c7cc146a1 Rebuild dist. 2014-11-28 15:43:43 -08:00
John-David Dalton
fa3b384c6f Add MapCache tests. 2014-11-28 15:38:54 -08:00
John-David Dalton
3f9a878b03 Correct name jsdoc entries. [ci skip] 2014-11-28 14:23:56 -08:00
John-David Dalton
ab3b972185 Add mapDelete. 2014-11-28 14:00:42 -08:00
John-David Dalton
fb9118a044 Ensure objects work in a lazy chain sequence. [closes #796] 2014-11-28 14:00:41 -08:00
Evgeny Boxer
5cce5b6707 Add a spec to catch a Safari JIT bug. [closes #798] 2014-11-28 14:00:41 -08:00
John-David Dalton
3256c9b3f5 Add _.parseInt test for its bizarro form. 2014-11-28 14:00:41 -08:00
John-David Dalton
8b43b2b69d Make more methods use isIterateeCall. 2014-11-27 00:22:17 -08:00
John-David Dalton
02a862684d Rename _.sortByMultiple to _.sortByAll. 2014-11-25 00:36:27 -08:00
John-David Dalton
c15f5b5106 Cleanup tests. 2014-11-25 00:35:33 -08:00
John-David Dalton
0f06d51065 Add more "hot" method tests. 2014-11-24 23:57:35 -08:00
John-David Dalton
8abfa419e8 Use _.includes instead of _.contains in saucelabs.js. 2014-11-24 23:57:35 -08:00
John-David Dalton
c3c90ab78b Fix typo in saucelabs.js. 2014-11-24 23:57:35 -08:00
John-David Dalton
666be21f59 Update vendors. 2014-11-24 23:57:34 -08:00
John-David Dalton
0fe8197100 Add _.sortByMultiple. 2014-11-23 23:26:11 -08:00
John-David Dalton
d8a7a7792a Comment cleanup. [ci skip] 2014-11-23 23:25:34 -08:00
John-David Dalton
82b9a0c949 Rename _.contains to _.includes. 2014-11-23 18:38:32 -08:00
John-David Dalton
a3083d2990 Add V8 bug note to setData. 2014-11-23 15:36:10 -08:00
John-David Dalton
3c62914304 Cleanup createWrapper and mergeData. 2014-11-23 15:35:49 -08:00
John-David Dalton
a094768469 Move sourceURL to the beginning of the function body to avoid errors in narwhal. 2014-11-23 14:53:57 -08:00
John-David Dalton
3965f063d3 Rename wrapper vars to wrapped. 2014-11-22 14:34:44 -08:00
John-David Dalton
2b7c295bf1 Use slice() instead of map() in tests. 2014-11-22 14:31:52 -08:00
John-David Dalton
2fd297c1e1 Ensure reverse returns a LodashWrapper instance when chaining. 2014-11-22 14:31:32 -08:00
John-David Dalton
263c04aeb2 Merge pull request #793 from FilipZawada/reverse
Fix broken lazy reverse.
2014-11-22 13:10:50 -08:00
Filip Zawada
8f2b5e195e Fix broken lazy reverse 2014-11-22 17:27:46 +01:00
John-David Dalton
7e3dd2b8cc Cleanup previous commit. 2014-11-22 00:09:01 -08:00
John-David Dalton
49c027537e Merge pull request #790 from FilipZawada/lazy-first-last
Fix non-lazy calls not executed before `first` & `last`.
2014-11-21 14:02:42 -08:00
Filip Zawada
a1a6095295 Fix non-lazy methods not executed when used with lazy .first() or .last() 2014-11-21 22:45:04 +01:00
John-David Dalton
5f7dcc9b78 Add lazy _.compact test and cleanup previous fix. 2014-11-21 01:33:38 -08:00
John-David Dalton
1705bf4f3c Rename shadowedProps to shadowProps. 2014-11-21 00:39:59 -08:00
Filip Zawada
8612946bf5 Fix lazy methods to execute non-lazy methods performed in between. 2014-11-20 21:05:53 -08:00
John-David Dalton
7cf40576dd Uncomment Android now that Sauce has fixed their issue. 2014-11-20 21:04:03 -08:00
John-David Dalton
239f35d830 Add mergeData helper. 2014-11-20 21:03:52 -08:00
John-David Dalton
05ff42b767 Use collection more in place of "the collection" in docs. [ci skip] 2014-11-18 06:11:40 +01:00
John-David Dalton
7bab4817f2 Tweak lazy _.pluck and _.where methods. 2014-11-17 07:17:13 +01:00
John-David Dalton
0d87b7d720 More comment cleanup. [ci skip] 2014-11-16 08:45:36 +01:00
John-David Dalton
6b72adbeee Don't use metadata for rearg'ed functions if previously partially applied. 2014-11-15 23:57:56 +01:00
John-David Dalton
db97ae46e5 Cleanup lazy _.pluck and _.where. 2014-11-15 23:52:50 +01:00
John-David Dalton
fc6c084693 Simulate Safari 8's typed array constructor issue better. 2014-11-14 19:19:28 -08:00
John-David Dalton
9e01cc5705 Clarify _.isFunction fallback note. [ci skip] 2014-11-14 19:16:14 -08:00
John-David Dalton
f9ce45c058 Avoid errors in modularized build runs. 2014-11-14 11:52:18 -08:00
John-David Dalton
056ff4b6ea Tweak _.isFunction fallback check. 2014-11-14 11:35:23 -08:00
John-David Dalton
52653f73b9 Fix failing phantomjs test. 2014-11-14 09:19:57 -08:00
Filip Zawada
a06207b814 Add lazy _.pluck and _.where. [closes #776] 2014-11-14 07:36:11 -08:00
Benjamin Tan
3b3ef411a4 Minor cleanup in _.invoke, _.sortBy, and lazy wrapper for _.filter. 2014-11-14 07:34:19 -08:00
John-David Dalton
6418f78fdb Add a test for _.rearg used on already rearged functions. 2014-11-13 23:12:57 -08:00
John-David Dalton
5d4187bf03 Add _.isFunction test for its fallback. 2014-11-13 23:12:27 -08:00
John-David Dalton
cfffad73eb Make cloneBuffer use _.constant instead of _.identity. 2014-11-13 23:10:27 -08:00
John-David Dalton
ef7db87b82 Capitalize and punctuate comments. [ci skip] 2014-11-13 00:46:03 -08:00
John-David Dalton
212eea9cf5 Avoid JIT bug in Safari 8. 2014-11-12 21:56:44 -08:00
John-David Dalton
da792cc272 Cleanup baseDifference. 2014-11-12 21:56:26 -08:00
John-David Dalton
2ae2142b35 Rebuild dist. 2014-11-12 00:00:10 -08:00
John-David Dalton
a00f5f308a Rename MemCache to MapCache. 2014-11-11 23:12:53 -08:00
John-David Dalton
81cfde12f3 Remove Android 4.0 from Sauce until their issue is resolved. 2014-11-11 18:16:17 -08:00
John-David Dalton
1a53d38dae Fix failing tests in Node. 2014-11-11 01:36:39 -08:00
John-David Dalton
b834fdbc5e Reorganize wrappers, adding SetCache as a hybrid cache combining ES6 Set and object lookups, 2014-11-11 01:13:15 -08:00
John-David Dalton
1cb2db03ed Add isIndex helper. 2014-11-10 14:24:47 -08:00
John-David Dalton
57bca50ed0 Fix _.template benchmarks. 2014-11-09 22:48:23 -08:00
John-David Dalton
94386583e2 Remove less useful benchmarks from perf.js. 2014-11-09 22:48:09 -08:00
John-David Dalton
b1ab63d549 Use available value var in _.difference. 2014-11-09 22:45:47 -08:00
John-David Dalton
ad56bdd354 Move isArray check higher up in lodash function. 2014-11-09 22:43:50 -08:00
John-David Dalton
65e30c13e2 Clarify comments on _.support.spliceObjects and _.isFunction. [ci skip] 2014-11-09 09:52:24 -08:00
John-David Dalton
0c54fac651 Whitespace nit in _.propertyOf doc example. [ci skip] 2014-11-09 01:38:43 -08:00
John-David Dalton
9660c22a9f Make unicode chars lower case. 2014-11-09 01:34:24 -08:00
John-David Dalton
31e8df4a59 Tweak _.parseInt doc note. [ci skip] 2014-11-09 00:07:11 -08:00
John-David Dalton
8e6ecaf8d4 Remove period from comment to conform to style. [ci skip] 2014-11-09 00:05:40 -08:00
John-David Dalton
4d69a0ce29 Add comments to _.isFunction. [ci skip] 2014-11-09 00:02:00 -08:00
John-David Dalton
1b842f86ca Optimize _.chunk. 2014-11-08 19:34:37 -08:00
John-David Dalton
a2330fb630 Fix test fails on old Android & Safari. 2014-11-08 09:28:47 -08:00
John-David Dalton
30f0232d71 Tweak docs for _.property and _.propertyOf. [ci skip] 2014-11-08 08:54:43 -08:00
John-David Dalton
404e658a5d Fix _.isFunction and _.isNative for Safari 8. 2014-11-08 02:47:17 -08:00
John-David Dalton
f5682397c2 Remove Rhino guards from curry tests and add a partial test. 2014-11-07 22:57:16 -08:00
John-David Dalton
4896810258 Add Safari 8 to Sauce tests. 2014-11-07 21:50:30 -08:00
John-David Dalton
dd0de8b6e1 Doc cleanup. [ci skip]
Conflicts:
	lodash.js
2014-11-07 21:44:56 -08:00
John-David Dalton
2a9f9f7ebd Don't set data on functions created by a curried function. 2014-11-07 21:44:56 -08:00
John-David Dalton
2f3afd3637 Add _.propertyOf. 2014-11-07 21:44:56 -08:00
John-David Dalton
f0a2c88fdc Add more _.identity for nullish args tests. 2014-11-07 21:44:56 -08:00
John-David Dalton
c3a5b12cd3 Make _.wrap use _.identity when wrapper is nullish. [closes #767] 2014-11-07 21:44:56 -08:00
John-David Dalton
d7b0e66270 Comment out Android 4.3 test in Sauce until they resolve their issue. 2014-11-07 21:44:17 -08:00
John-David Dalton
1871ed5441 Avoid modularized test fails for Rhino. 2014-11-06 22:23:54 -08:00
John-David Dalton
5ea6948127 Add _.rearg tests. 2014-11-06 20:46:27 -08:00
John-David Dalton
9bd77d36f1 Add _.pullAt tests. 2014-11-06 20:46:03 -08:00
John-David Dalton
3ffa6cd1ac Add test for _.at and non-index keys on array-like values. 2014-11-06 20:45:18 -08:00
John-David Dalton
ad87df3168 Make shimKeys style more consistent with keysIn. 2014-11-06 20:44:40 -08:00
John-David Dalton
8bd0d32fd2 Remove isArrayLike and isPlainObject guards from baseMerge. 2014-11-06 20:44:16 -08:00
John-David Dalton
f182675a6e Ensure baseAt uses undefined for non-index values for array-like collections. 2014-11-06 20:43:34 -08:00
John-David Dalton
56ce89e04f Tweak _.curry and _.curryRight docs. [ci skip] 2014-11-06 20:42:33 -08:00
John-David Dalton
062ec036f8 Cleanup _.rearg docs and simplify reorder. 2014-11-06 20:41:50 -08:00
John-David Dalton
8089242b2f Add Firefox 33 to sauce tests. 2014-11-05 23:51:16 -08:00
John-David Dalton
8efa1a0032 Experiment with _.defer in createHybridWrapper. 2014-11-05 01:59:41 -08:00
John-David Dalton
7ce8304ce6 Make _.defer and _.delay slice arguments in the timeout callback. 2014-11-05 01:59:17 -08:00
John-David Dalton
233adab647 Add _.rearg. 2014-11-05 01:09:05 -08:00
John-David Dalton
475c86d100 Tweak code comments. [ci skip] 2014-11-02 23:43:10 -08:00
John-David Dalton
f754654dae Rebuild dist. 2014-11-02 14:33:24 -08:00
John-David Dalton
53ce20c0df Comma nit in getView doc. [ci skip] 2014-11-02 14:33:09 -08:00
John-David Dalton
ad91e3a344 Make lazy chaining tests a bit more complex. 2014-11-02 14:19:38 -08:00
John-David Dalton
4f2b33f80f Cleanup docs for _.slice and _.range. [ci skip] 2014-11-02 11:30:32 -08:00
John-David Dalton
2b24d42f8d Add getView and cleanup Lazy chaining. 2014-11-02 11:30:06 -08:00
John-David Dalton
ab70f306cd Make iteration fix in _.keysIn less constructor specific. 2014-11-01 01:24:10 -07:00
John-David Dalton
4fb83fe0a5 Assorted doc cleanup. [ci skip] 2014-10-31 21:36:28 -07:00
John-David Dalton
9c6ef34270 Remove dropdown menu entries for unsupported builds. 2014-10-31 00:19:34 -07:00
John-David Dalton
481eb8e5dc Cleanup test/asset/worker.js. 2014-10-31 00:17:08 -07:00
John-David Dalton
7cf65b899b Add another [[DontEnum]] test. 2014-10-30 23:54:43 -07:00
John-David Dalton
dd70fcb9bc Cleanup _.dropRightWhile and _.takeRightWhile. 2014-10-30 23:53:39 -07:00
John-David Dalton
6dd8c05533 Cleanup _.keysIn. 2014-10-30 23:53:28 -07:00
John-David Dalton
0b900d94f7 Ensure root is set correctly when required by a greasemonkey userscript. [closes #759] 2014-10-30 22:01:00 -07:00
John-David Dalton
cf724c43cb Simplify lazy chaining. 2014-10-30 20:57:24 -07:00
John-David Dalton
cdf5ac4fc4 Ensure _.keysIn skips inheritedconstructor properties. 2014-10-29 22:41:51 -07:00
John-David Dalton
b768ce4ca4 Add test for inherited shadowed props. 2014-10-29 22:40:49 -07:00
John-David Dalton
0115503af9 Fix _.keysIn for inherited non-enumerable props. 2014-10-28 23:19:08 -07:00
John-David Dalton
08dd30c5bf Make lazy _.drop test more complex. 2014-10-26 21:38:53 -07:00
John-David Dalton
72270013c8 Cleanup assignment method tests. 2014-10-25 00:30:56 -07:00
John-David Dalton
a2a59cbeae Add find method tests. 2014-10-24 23:30:12 -07:00
John-David Dalton
20a38d2dbe Test order nits. 2014-10-24 23:29:43 -07:00
John-David Dalton
9aade0a2da Remove backbone build from .gitignore. 2014-10-24 22:32:51 -07:00
John-David Dalton
9af1d1af52 Remove underscore build test runs from travis.yml. 2014-10-24 22:06:10 -07:00
John-David Dalton
8bb69cd6da Rebuild dist. 2014-10-24 22:01:39 -07:00
John-David Dalton
84a84a1687 Remove underscore build config from Underscore tests. 2014-10-24 21:53:57 -07:00
John-David Dalton
462c43434b Add _.callback test. 2014-10-23 23:46:05 -07:00
John-David Dalton
b830691611 Add more _.assign, _.defaults, _.merge, and _.transform tests. 2014-10-23 23:21:26 -07:00
John-David Dalton
204f1747cf Ensure old Opera avoids a false positive for support of isHostObject. 2014-10-23 21:46:46 -07:00
John-David Dalton
13c9d80a3b Use the new operator to ensure constructors of other realms produce objects of those realms. 2014-10-23 20:43:49 -07:00
John-David Dalton
64f45b061b Avoid testing arguments object constructor which may be Array in some old browsers. 2014-10-23 20:42:32 -07:00
John-David Dalton
c1202fd127 Fix isArrayLike in older IE. 2014-10-23 17:04:13 -07:00
John-David Dalton
2060f3f59a Ensure _.at and _.pullAt work with falsey array and collection values when keys are provided. 2014-10-23 17:04:13 -07:00
John-David Dalton
1fb92df2e7 Fix test fails. 2014-10-23 17:04:06 -07:00
John-David Dalton
848301bf70 Add tests for clone methods and objects from other realms. 2014-10-22 22:58:25 -07:00
John-David Dalton
08b5b71fcb Cleanup test titles. 2014-10-22 22:29:04 -07:00
John-David Dalton
5414d4a9e4 Add tests for _.transform and objects from other realms. 2014-10-22 22:28:47 -07:00
John-David Dalton
b930bd7326 Add isLength helper. 2014-10-22 22:28:24 -07:00
John-David Dalton
d1d1be49ba Reduce lazy wrapper for lazy first and last. 2014-10-21 08:04:29 -07:00
John-David Dalton
6ad7963347 Fix _.merge doc typo. [ci skip] [closes #754] 2014-10-21 07:41:34 -07:00
John-David Dalton
2dcda2487a Cleanup test titles. 2014-10-20 22:18:10 -07:00
John-David Dalton
55911eac7a Add lazy tests for _.first and _.last. 2014-10-20 22:17:48 -07:00
John-David Dalton
176b109ae7 Rebuild dist. 2014-10-20 20:10:25 -07:00
Benjamin Tan
0f12d43a59 Simplify _.keys and _.keysIn. 2014-10-20 19:58:05 -07:00
John-David Dalton
6dfc2aca4b Add LazyWrapper#slice. 2014-10-20 11:33:03 -07:00
John-David Dalton
f5a34d5191 Add indexOf method test for empty arrays. 2014-10-20 11:33:02 -07:00
John-David Dalton
bc3a7f70e4 Test title cleanup. 2014-10-20 11:33:02 -07:00
John-David Dalton
dcabee8d5e Expand function test for _.matches. 2014-10-20 11:33:02 -07:00
John-David Dalton
d7e290dc68 Add more isIterateeCall guards. 2014-10-20 11:33:02 -07:00
John-David Dalton
2e2341c8b2 Add arrayMin and arrayMax helpers. 2014-10-19 03:25:26 -07:00
John-David Dalton
0ee717342b Minor format nit in travis.yml. 2014-10-19 03:25:26 -07:00
John-David Dalton
9f372b3146 Update tested version of Opera in readme. [ci skip] 2014-10-19 03:25:26 -07:00
John-David Dalton
dd92e36feb Ensure Node 0.8 runs modern build tests in travis. 2014-10-18 11:31:45 -07:00
John-David Dalton
c25738c62c Avoid logging npm warnings to travis. 2014-10-18 11:31:45 -07:00
John-David Dalton
c264e98e6e Fix travis run. 2014-10-18 11:31:45 -07:00
John-David Dalton
f2780bcbc2 Add isCloneable and clonePassthru. 2014-10-18 11:31:44 -07:00
John-David Dalton
050b703fc0 Update npm used in travis.yml. 2014-10-18 11:31:44 -07:00
John-David Dalton
eed09f64f7 Cleanup _.matches. 2014-10-18 11:31:44 -07:00
John-David Dalton
28c4ad1501 Cleanup _.zipObject. 2014-10-18 11:31:44 -07:00
John-David Dalton
28d1dad629 Cleanup _.template tests. 2014-10-18 11:31:44 -07:00
John-David Dalton
b5f0672888 Fix failing clone tests. 2014-10-18 11:31:44 -07:00
John-David Dalton
71fc4faae7 Update vendor/benchmark.js. 2014-10-18 11:31:44 -07:00
John-David Dalton
8bff1e8bc4 Ensure a customer function works on deep cloned objects. 2014-10-18 11:31:44 -07:00
John-David Dalton
af67dd6610 Tweak _.clone and _.cloneDeep docs. [ci skip] 2014-10-18 11:31:44 -07:00
John-David Dalton
c46c700f7c Change source order of arrayFilter and arrayMap. 2014-10-18 11:31:44 -07:00
John-David Dalton
2a2de2efdc Make _.clone and _.cloneDeep return an empty object for unsupported types. 2014-10-18 11:31:44 -07:00
John-David Dalton
f384c42de5 Updated tested Chrome version in Sauce Labs. 2014-10-18 11:31:44 -07:00
John-David Dalton
bf1c54e5a3 Add lazy _.filter and _.reject tests. 2014-10-18 11:31:43 -07:00
John-David Dalton
d8f2cc50df Add getUnwrappedValue test helper to fix npm modularized builds. 2014-10-18 11:31:43 -07:00
John-David Dalton
06c25ba998 Use https protocol for downloading travis resources from lodash.com. 2014-10-18 11:31:43 -07:00
John-David Dalton
58654a3f3a Use https for lodash.com references in readme. [ci skip] 2014-10-18 11:31:43 -07:00
John-David Dalton
32521cd1b6 Add comment to lazy flags. [ci skip] 2014-10-12 12:56:33 -07:00
John-David Dalton
e072fe6ea9 Move LodashWrapper.prototype and MemCache assignments out of the method assignments block. 2014-10-12 12:38:59 -07:00
John-David Dalton
b5897fdb62 Add more lazy_.drop, _.dropRight, _.take, _.takeRight tests. 2014-10-10 09:48:27 -07:00
John-David Dalton
55df525f1b Update tested Chrome version in readme. [ci skip] 2014-10-09 09:50:48 -07:00
John-David Dalton
e6dde68924 Excuse Underscore _.memoize test. 2014-10-09 09:50:27 -07:00
John-David Dalton
b3e2305dea Fix typo and add lazy tests. 2014-10-09 09:50:08 -07:00
John-David Dalton
ec3e3ed1fd Simplify lazyValue. 2014-10-09 00:16:56 -07:00
John-David Dalton
30fc97eef6 Fix shortcut fusion. 2014-10-08 23:44:45 -07:00
John-David Dalton
5939692616 Remove multi-line comment wrap from _.template sourceURLs. [closes #738] 2014-10-08 09:17:15 -07:00
Tiago Ribeiro
9ce3176b59 Rename stop to end in _.range docs. [ci skip] 2014-10-06 09:38:46 -07:00
John-David Dalton
497d35b03b Continued chaining cleanup. 2014-10-06 09:38:46 -07:00
John-David Dalton
6a1191de31 Add docs to MemCache and LazyWrapper methods and reduce LazyWrapper scaffolding. 2014-10-05 18:51:57 -07:00
John-David Dalton
6c3a17de71 Add lazy chaining benchmark. 2014-10-04 11:13:28 -07:00
John-David Dalton
22cf82e44b Add note to whitespace test and add back non-character BOM test. 2014-10-04 11:11:52 -07:00
John-David Dalton
10c7e49273 Qualify listed contributors in readme. [ci skip] [closes #732] 2014-10-03 14:28:55 -07:00
John-David Dalton
4900eae751 Correct result of methods that should not return a wrapped value. 2014-10-03 00:14:10 -07:00
John-David Dalton
5334c599f0 Cleanup lazyValue. 2014-10-03 00:13:19 -07:00
John-David Dalton
ad10a1eba5 Rename var chain to chainAll in _.mixin. 2014-10-02 09:47:11 -07:00
John-David Dalton
3ca626f2a9 Add lazy drop, dropRight, initial, last, rest, reverse, and takeRight. 2014-10-02 09:46:37 -07:00
John-David Dalton
e7ad40d8f4 Make _.initial use _.dropRight and _.rest use _.drop. 2014-10-02 09:45:11 -07:00
Benjamin Tan
d38ab1145a createCompounder: Remove unused words argument 2014-10-02 00:38:41 -07:00
Benjamin Tan
f31360e1a4 _.once: Use basePartial instead of partial 2014-10-02 00:36:29 -07:00
Benjamin Tan
059fead736 Minor doc updates. [ci skip] 2014-10-02 00:34:48 -07:00
John-David Dalton
4e8360c030 Remove BOM from _.trim test. 2014-10-02 00:21:09 -07:00
John-David Dalton
fbd80746a5 Refactor lazy evaluation. 2014-10-02 00:21:04 -07:00
John-David Dalton
072a5de1c5 Cleanup _.memoize.Cache. 2014-09-29 20:41:18 -07:00
John-David Dalton
5c3c5a5521 Cleanup _.memoize tests. 2014-09-28 15:14:45 -07:00
Filip Zawada
461b294bc7 Add support for lazy evaluation to chaining syntax. [closes #247, #678] 2014-09-28 08:51:59 -07:00
John-David Dalton
71de0f2d08 Make support references align with templateSetting references. 2014-09-26 09:43:33 -07:00
John-David Dalton
2ffdc4f2ef Minor style nit. [ci skip] 2014-09-25 09:42:47 -07:00
John-David Dalton
dc9b320c4a Ensure _.indexOf and _.lastIndexOf match NaN when performing a binary search. 2014-09-25 09:42:27 -07:00
John-David Dalton
a6a93148b4 Clarify documented default params of identity as _.identity. [ci skip] 2014-09-24 22:46:06 -07:00
jabclab
f7dc3b9ce4 Add _.memoize.Cache to allow using ES6 Map/WeakMap. 2014-09-24 13:40:00 -07:00
John-David Dalton
12ad5d53c9 Rebuild dist. 2014-09-24 11:14:32 -07:00
John-David Dalton
54dc1e2e15 Exit early from _.contains if length is 0 to avoid potentially mucking up getIndexOf by passing it an undefined collection. 2014-09-24 11:13:16 -07:00
John-David Dalton
073f715f17 Qualify isIterateeCall use. 2014-09-24 09:48:59 -07:00
John-David Dalton
7ff50893dc Doc cleanup. [ci skip] 2014-09-24 09:32:51 -07:00
John-David Dalton
d128082b23 Add indexOfNaN and remove checks from baseIndexOf. 2014-09-24 09:32:51 -07:00
John-David Dalton
1b8f89c3f1 Update sauce browser versions. 2014-09-24 09:32:51 -07:00
John-David Dalton
8eb138e0b3 Add more tests for methods used as an iteratee for _.map. 2014-09-24 09:32:51 -07:00
John-David Dalton
8256579310 Add _.words tests and tweak reWords regexp. 2014-09-24 09:32:51 -07:00
John-David Dalton
41f1fb8d95 Minor source tweak of _.template. 2014-09-22 10:53:33 -07:00
John-David Dalton
277d91afce Minor code format tweak for _.isBoolean, _.isElement, _.isNumber, and _.isString. 2014-09-22 09:44:54 -07:00
John-David Dalton
aaa840ebef Add isIterateeCall and make more methods support being used as a callback for methods like _.map. 2014-09-22 09:44:13 -07:00
John-David Dalton
29ffdadabb Ensure _.trunc and _.words work as a callback for methods like _.map 2014-09-22 09:43:03 -07:00
John-David Dalton
e5f19fe037 Minor whitespace nit. [ci skip] 2014-09-21 23:26:01 -07:00
John-David Dalton
5791d71e9f Add _.deburr and _.words tests. 2014-09-21 23:25:39 -07:00
John-David Dalton
104a7022fb Remove es6 scaffolding from html test files. 2014-09-21 23:24:28 -07:00
John-David Dalton
6210b613be Since we're using the caret no need for minor version in travis.yml. 2014-09-20 18:55:59 -07:00
John-David Dalton
2ba9380616 Avoid carrot use in travis.yml deps for pre 1.0 deps. [ci skip] 2014-09-20 16:47:14 -07:00
John-David Dalton
59042bc2e2 Update request dep in travis.yml. [ci skip] 2014-09-20 12:11:57 -07:00
John-David Dalton
ccfd8e51ea Rebuild dist. 2014-09-20 12:05:52 -07:00
John-David Dalton
1aafb6c2c1 Use type checks when checking for a prototype property. 2014-09-20 12:04:53 -07:00
John-David Dalton
7976aa4b28 Cleanup _.template doc examples. [ci skip] 2014-09-20 12:04:53 -07:00
John-David Dalton
1b4e175c0c Adjust the docs of _.forEach, _.after, _.before, _.debounce, & _.throttle. [closes #710] [ci skip] 2014-09-20 12:04:53 -07:00
John-David Dalton
3ef955c139 Fix failing npm test. 2014-09-18 19:55:49 -07:00
John-David Dalton
51990ed0e5 Fix failing IE9 test. 2014-09-18 19:55:49 -07:00
John-David Dalton
138523bab3 Add _.deburr, _.thru, and _.words to the features section of the readme. [closes #709] [ci skip] 2014-09-18 19:55:49 -07:00
John-David Dalton
995ec2b104 Add array chaining tests and fix _#unshift. 2014-09-18 09:43:42 -07:00
John-David Dalton
d13f8749d4 Minor cleanup of baseIsEqual. 2014-09-17 21:28:38 -07:00
John-David Dalton
0350443810 Reduce deps in baseIsEqual, shimIsPlainObject, omit, & pick. 2014-09-17 20:52:06 -07:00
John-David Dalton
c5841dccbb Remove toObject use from _.keysIn. 2014-09-17 12:50:22 -07:00
John-David Dalton
a0c50f9ef5 Remove type check in _.transform. 2014-09-17 12:34:46 -07:00
John-David Dalton
120020b4db Avoid toObject in the shimKeys path of _.keys. 2014-09-17 12:34:19 -07:00
John-David Dalton
676747467a Make the support checks in shimKeys consistent with keysIn. 2014-09-17 12:33:34 -07:00
John-David Dalton
e2d13541dc Update tested node version in readme. [ci skip] 2014-09-17 00:52:54 -07:00
John-David Dalton
057cbc76b3 Add toObject to baseFor and baseForRight. 2014-09-17 00:47:18 -07:00
John-David Dalton
48035187d2 Comment test. [ci skip] 2014-09-17 00:47:18 -07:00
John-David Dalton
f05f60f929 Ensure _.sample chains correctly. 2014-09-16 09:17:08 -07:00
John-David Dalton
3ab19e81ac Cleanup _.transform and make baseEach and baseEachRight use toObject. 2014-09-16 01:51:46 -07:00
John-David Dalton
532be6cd87 Minor _.transform test title nits. [ci skip] 2014-09-16 01:51:45 -07:00
John-David Dalton
21a492fa43 Simplify _.mixin. 2014-09-15 01:29:18 -07:00
John-David Dalton
edf83823f1 Fix baseSortedIndex on large arrays by avoiding >>> use. 2014-09-15 01:29:12 -07:00
John-David Dalton
8d6f7de046 Increase _.sample and _.sortedIndex coverage. 2014-09-15 01:15:03 -07:00
John-David Dalton
a7de4f3663 Fix _.sample test. 2014-09-15 01:15:02 -07:00
John-David Dalton
e538f16315 Use var wrapped for wrapped values instead of actual. 2014-09-15 01:15:02 -07:00
John-David Dalton
3f8b3e2baa Fix failing npm tests. 2014-09-14 18:57:59 -07:00
John-David Dalton
a90ecde389 Wrapper doc tweaks. [ci skip] 2014-09-14 18:57:59 -07:00
John-David Dalton
1ad65bb66b Add trailing slash to _.escapeRegExp doc example. [ci skip] 2014-09-14 16:21:48 -07:00
John-David Dalton
d85bb3bce1 Remove unused descriptor var. 2014-09-13 15:20:42 -07:00
John-David Dalton
8cd4732321 Reduce code related to array method chaining. 2014-09-13 01:36:07 -07:00
John-David Dalton
6957b02c27 Remove handling of function queue values from wrapperValueOf. 2014-09-12 12:07:33 -07:00
John-David Dalton
adcadf08d1 Add iteration order note to _.pluck doc and adjust similar notes. [closes #703] [ci skip] 2014-09-12 09:43:32 -07:00
John-David Dalton
3b36145257 More cleanup of chaining code. 2014-09-12 09:16:23 -07:00
John-David Dalton
c3e5eaf8da Cleanup join, pop, shift chaining setup code. 2014-09-12 00:24:53 -07:00
John-David Dalton
fd176107ae Simplify mixin use. 2014-09-12 00:03:07 -07:00
John-David Dalton
ad203e1461 Fix deferred chaining test fails. 2014-09-11 23:36:12 -07:00
John-David Dalton
1fe9ba5879 Make string methods work with latin-1 characters by default. 2014-09-10 23:47:49 -07:00
John-David Dalton
678321bb2f Make _.unescape doc example align with _.escape. [ci skip] 2014-09-09 23:33:05 -07:00
John-David Dalton
967ce824f7 Add _.thru doc example and add pattern param to _.words. [ci skip] 2014-09-09 23:32:14 -07:00
John-David Dalton
336e5e0ff7 Excuse additional underscore test. 2014-09-09 00:17:30 -07:00
John-David Dalton
7a94f472c7 Add _.deburr, _.thru, & _.words. 2014-09-09 00:17:01 -07:00
John-David Dalton
70b41a2a6e Adjust how words are deburred. 2014-09-08 00:54:19 -07:00
John-David Dalton
216e7f3b10 Tweak docs for array params. [ci skip] 2014-09-08 00:09:18 -07:00
John-David Dalton
0717da6e37 Make chaining actions deferred until value is called. 2014-09-08 00:09:14 -07:00
John-David Dalton
3f64316e00 Make _.camelCase process words as lower cased. 2014-09-07 01:20:18 -07:00
John-David Dalton
172eaf84b5 Ensure string case methods work with words in all caps. 2014-09-06 10:14:03 -07:00
John-David Dalton
0c20889a17 Minor comment nit. [ci skip] 2014-09-06 00:30:25 -07:00
John-David Dalton
62523d537b Change default sauce param values. 2014-09-06 00:23:45 -07:00
John-David Dalton
6643252019 Fix qunit-extras sauce reporter. 2014-09-06 00:23:24 -07:00
John-David Dalton
13022a6bb0 Realign baseSortedIndex with _.sortBy. 2014-09-05 09:25:48 -07:00
John-David Dalton
fc018691e5 Change name to user in docs and tests to avoid this.name. 2014-09-05 09:01:51 -07:00
John-David Dalton
56666c4bf4 Use a string of keywords in package.json. 2014-09-04 23:57:36 -07:00
John-David Dalton
379da81f85 Add support for Sauce reports to qunit-extras. 2014-09-04 23:57:07 -07:00
John-David Dalton
9ce6d4b72a Add test for _.sortBy sorting undefined and NaN values. 2014-09-03 23:43:32 -07:00
John-David Dalton
be46c31c74 Update tested version of Firefox in readme. [ci skip] 2014-09-03 23:21:11 -07:00
John-David Dalton
cd4029dc61 Make _.sortBy moveundefined and NaN to the end of the array. 2014-09-03 09:32:09 -07:00
John-David Dalton
d2aa55a3bd Rebuild dist. 2014-09-02 09:25:42 -07:00
John-David Dalton
838be0846d Update tested Opera version in readme. [ci skip] 2014-09-02 09:25:36 -07:00
John-David Dalton
9414cb97b5 Add _.isNative doc example. 2014-09-02 09:21:43 -07:00
John-David Dalton
d6883a077a Add Lang category. 2014-09-02 09:21:43 -07:00
John-David Dalton
aa60b8399b Fix tests for the npm build. 2014-09-02 09:21:43 -07:00
John-David Dalton
cbe504df77 Fix test in IE. 2014-09-02 09:21:43 -07:00
John-David Dalton
e0efcc1f25 Fix test fails when using a non-requirejs loader. 2014-09-02 09:21:43 -07:00
John-David Dalton
c6e536a768 Use metaMap inference instead of WeakMap. 2014-09-01 23:44:37 -07:00
John-David Dalton
77ba53bda7 Remove defineProperty forks of baseSetData and getData. 2014-09-01 20:39:39 -07:00
John-David Dalton
c2c6f1493a Add tests for pop, shift, and slice. 2014-09-01 20:39:39 -07:00
John-David Dalton
debaed6e5e Allow _.before and _.after to accept func as the first argument 2014-09-01 17:13:07 -07:00
John-David Dalton
0d6279617b Add _.isEqual tests for arrays and objects from different documents. 2014-09-01 17:13:07 -07:00
John-David Dalton
3435314400 Remove unneeded "bugs" entry in package.json. [ci skip] 2014-09-01 13:26:09 -07:00
John-David Dalton
f248a8383b Add tests to ensure length is computed before iteration. 2014-09-01 13:25:51 -07:00
John-David Dalton
5458b007d1 Cleanup default assignment of placeholders. 2014-08-28 00:09:16 -07:00
John-David Dalton
6735291c99 Try to avoid an inconsistent false fail on ipad simulator. 2014-08-27 08:58:49 -07:00
John-David Dalton
6ad7a20c07 Update Underscore build compat to 1.7.0. 2014-08-27 07:30:39 -07:00
John-David Dalton
3191825ecc Cleanup features list and update tested Chrome version in readme. [ci skip] 2014-08-27 00:53:55 -07:00
John-David Dalton
baee6b9738 Update deps. 2014-08-26 23:55:39 -07:00
John-David Dalton
c4a7f899db Fix tests for rhino -require. 2014-08-26 21:36:04 -07:00
John-David Dalton
c01623ba56 Avoid false fail in environments that add an enumerable constructor property to Date objects. 2014-08-26 09:33:46 -07:00
John-David Dalton
81d0d5c59f Adjust mocking to ensure coverage in modularized builds. 2014-08-26 09:33:03 -07:00
John-David Dalton
cc4fdfd852 Ensure arity is not less than 0. 2014-08-25 23:14:28 -07:00
John-David Dalton
ba7be29153 Remove defineProperty mock. 2014-08-25 23:03:10 -07:00
John-David Dalton
4eae95b88d Ensure node version is consistent with its shorthand alias travis.yml. 2014-08-25 20:32:57 -07:00
John-David Dalton
06d8281f16 Add more bizarro support changes. 2014-08-25 10:25:01 -07:00
John-David Dalton
87c21ba75e Add coverage for WeakMap usage. 2014-08-25 09:32:26 -07:00
John-David Dalton
7f88a7c9bb Add more hot method tests. 2014-08-25 09:02:02 -07:00
John-David Dalton
38c57a662c Rebuild dist. 2014-08-24 21:34:59 -07:00
John-David Dalton
36f5ddc543 Add test for hot methods. 2014-08-24 21:33:44 -07:00
John-David Dalton
8b873b6b1b Make breaker trip when greater than or equal to HOT_COUNT. 2014-08-24 21:33:44 -07:00
John-David Dalton
68bd881ca8 Cleanup test names. [ci skip] 2014-08-24 18:02:19 -07:00
John-David Dalton
c3e717a3ef Rename _.consume to _.flow. 2014-08-24 18:02:06 -07:00
John-David Dalton
d9be6f8a9a Add _.consume and _.isNative to the features section of readme. [ci skip] 2014-08-24 13:54:09 -07:00
John-David Dalton
3bfb9d65f4 Prevent fails in older browsers due to timer drift. 2014-08-24 12:39:35 -07:00
John-David Dalton
9ad26f943f Minor doc nit and update lodash chaining doc to include _.consume and _.consumeRight. [ci skip] 2014-08-24 12:31:22 -07:00
John-David Dalton
c5112cb24e Add _.consume and _.consumeRight and make _.compose an alias of _.consumeRight. [closes #667] 2014-08-24 12:17:50 -07:00
John-David Dalton
c17e1f9e75 Doc tweak standardizing on "invoke" and "call". [ci skip] 2014-08-24 12:08:46 -07:00
John-David Dalton
b48b454909 Track down inconsistent sauce fail. 2014-08-24 00:02:01 -07:00
John-David Dalton
6b59a924e8 Avoid false fails on Sauce mocked alert/prompt functions. 2014-08-23 13:36:29 -07:00
John-David Dalton
87879a6784 Make _.isArguments length check consistent with its fallback. 2014-08-23 12:13:10 -07:00
John-David Dalton
fca5fda9da Avoid circular dep with isHostObject. 2014-08-23 12:12:24 -07:00
John-David Dalton
691d566482 Add test for string as object when passed as the third param to _.forEach callbacks. 2014-08-22 22:27:13 -07:00
John-David Dalton
61578f4dca Add missing semicolon. [ci skip] 2014-08-21 20:24:09 -07:00
John-David Dalton
9f4a7fc0da Ensure wrapped arrays are compared correctly in _.isEqual. [closes #676] 2014-08-21 09:29:27 -07:00
Benjamin Tan
200a5d84c7 Update docs. [closes #674] [ci skip] 2014-08-20 23:52:18 -07:00
John-David Dalton
309a2ad0a3 Rebuild dist. 2014-08-20 23:11:04 -07:00
John-David Dalton
e696331e2a Tweak property order note in method docs. [ci skip] 2014-08-20 23:08:04 -07:00
John-David Dalton
c3126e24ce Add _.support.hostObject and rename isNode to isHostObject. 2014-08-20 23:08:04 -07:00
John-David Dalton
bde931f2f5 Avoid testing constructors which may be shimmed. 2014-08-20 23:08:03 -07:00
John-David Dalton
58b3e9f201 Avoid test issues with error objects across environments. 2014-08-20 23:08:03 -07:00
John-David Dalton
1423dcb619 _.sortBy should not error on nullish elements when sorting by multiple properties. 2014-08-20 23:08:03 -07:00
John-David Dalton
df3540b0f9 Expose _.isNative. 2014-08-19 23:57:54 -07:00
John-David Dalton
921209580a Add DOM node check to _.isFunction test. 2014-08-19 23:57:54 -07:00
John-David Dalton
d4e058a844 Add _.negate unit test. 2014-08-19 23:57:53 -07:00
John-David Dalton
8f9eed154e Cleanup setData. 2014-08-18 09:31:30 -07:00
John-David Dalton
1416655d53 Minor whitespace nit. 2014-08-18 09:31:30 -07:00
John-David Dalton
9a147218ce Add console.log shim to avoid errors while deving. 2014-08-18 09:31:30 -07:00
John-David Dalton
34b575da03 Minor var nit in createPartialWrapper. 2014-08-18 09:31:30 -07:00
John-David Dalton
54d22a23b5 Avoid metadata cache for perf tests of slow paths of _.bind and _.partial. 2014-08-18 09:31:30 -07:00
John-David Dalton
ee10e17ce7 Fix perf regression of _.zip. 2014-08-18 09:31:30 -07:00
John-David Dalton
8ff97468cc Minor style nits. 2014-08-18 09:31:30 -07:00
John-David Dalton
6f898c6c97 Fix perf regression in _.omit & _.reject. 2014-08-18 09:31:30 -07:00
John-David Dalton
cfeb8d053f Attempt to throttle seData. 2014-08-18 09:31:29 -07:00
John-David Dalton
d317171a45 Remove sauce testing of older Firefox. 2014-08-18 09:31:29 -07:00
John-David Dalton
9b0aadccf8 Fix accidental leaked var. 2014-08-14 23:55:24 -07:00
John-David Dalton
d6850ab358 Use WeakMaps if available to store function metadata. 2014-08-14 23:55:23 -07:00
John-David Dalton
c139a0d9ed Avoid internally passing around metadata arrays. 2014-08-14 23:55:23 -07:00
John-David Dalton
67b0c4cddd Use _.createCallback if _.matches is unavailable for the perf test. 2014-08-14 23:55:23 -07:00
John-David Dalton
ce36bf6134 Update tested Firefox versions. 2014-08-14 23:55:23 -07:00
Benjamin Tan
e2dd65a403 Add more emphasis on the Note sections 2014-08-12 09:26:25 -07:00
John-David Dalton
a2595d5107 Remove native String#contains use in _.contains. 2014-08-12 09:26:25 -07:00
John-David Dalton
6dc0cf0c44 Typo nit in _.uniq tests. 2014-08-11 09:25:35 -07:00
John-David Dalton
faac630001 Update tested version of Node in readme. [ci skip] 2014-08-11 09:25:35 -07:00
John-David Dalton
0deacc7229 Add tests for large arrays and NaN values. 2014-08-11 09:25:35 -07:00
John-David Dalton
c849fe1496 Cleanup _.pull. 2014-08-09 09:43:31 -07:00
John-David Dalton
4238e84ec4 Add tests for matching NaN. 2014-08-09 09:43:31 -07:00
John-David Dalton
df4e306c64 Add length check to avoid extra work in initArrayClone. 2014-08-08 10:43:39 -07:00
John-David Dalton
916c728d70 Remove unneeded flag from baseClone call in _.matches. 2014-08-08 10:28:18 -07:00
John-David Dalton
476d85915b Revert rename of baseSlice and add initArrayClone and initObjectClone. 2014-08-08 10:27:11 -07:00
John-David Dalton
e54b8ead72 Rename cloneBuffer to bufferClone, split basePick into pickByArray and pickByCallback, and add arrayClone. 2014-08-07 00:23:32 -07:00
John-David Dalton
d2444d2992 Remove !source check from _.mixin. 2014-08-04 00:05:19 -07:00
John-David Dalton
48acda2c3c Add _.iteratee alias of _.callback. 2014-08-03 22:40:31 -07:00
John-David Dalton
264f7b1d30 Fix tests in old IE. 2014-08-03 14:03:36 -07:00
John-David Dalton
fc44d54607 Fix test fail. 2014-08-02 23:25:20 -07:00
John-David Dalton
afc3698578 Minor whitespace nits in test.js. [ci skip] 2014-08-02 22:08:37 -07:00
John-David Dalton
c3cd94b695 Fix coercing arity in baseCurry. 2014-08-02 22:08:17 -07:00
John-David Dalton
ea219f683e Rename noIterator to noIteratee. [ci skip] 2014-08-02 13:05:55 -07:00
John-David Dalton
faf6584652 Ensure _.mixin does not extend lodash when an object is provided with an empty options object. [closes #650] 2014-08-01 16:36:44 -07:00
John-David Dalton
4dc41749fb Cleanup NaN handling in baseIndexOf and _.lastINdexOf. 2014-08-01 11:27:37 -07:00
John-David Dalton
2aa94301a8 Rename iterator to iteratee. 2014-08-01 11:13:58 -07:00
John-David Dalton
d2870b6df7 Change strict equality matches to SameValueZero matches. 2014-07-31 17:25:58 -07:00
John-David Dalton
5cbc44610c Simplify support property detection. 2014-07-30 09:21:25 -07:00
John-David Dalton
9032cc0ecc Updated tested Chrome versions in Sauce. 2014-07-29 22:21:22 -07:00
John-David Dalton
e48b314ad0 Avoid type coercion of size in _.chunk unless needed. 2014-07-29 09:37:25 -07:00
John-David Dalton
6fdaf905c4 Update "features" section of readme. [ci skip] 2014-07-29 09:36:39 -07:00
John-David Dalton
79b706fb5c Add parentheses to clarify things. 2014-07-29 08:48:04 -07:00
John-David Dalton
eaee188244 Use resIndex where applied easily. 2014-07-29 08:47:23 -07:00
John-David Dalton
a6ac62d628 Update tested versions of Opera and PhantomJS. [ci skip] 2014-07-28 23:23:43 -07:00
John-David Dalton
7a7f12504b Consistent empty bracket style. 2014-07-28 09:33:24 -07:00
John-David Dalton
55c83d17e1 Fix sortedIndex method tests for phantomjs. 2014-07-28 01:26:01 -07:00
John-David Dalton
8009c1b7eb Rebuild dist. 2014-07-28 00:57:56 -07:00
John-David Dalton
1580453f4b Ensure _.sortedIndex and _.sortedLastIndex align with _.sortBy. 2014-07-27 19:40:10 -07:00
John-David Dalton
9cc8f5dd07 Add bizarro tests for _.parseInt. 2014-07-27 17:42:56 -07:00
John-David Dalton
7e326b8431 Simplify support.nonEnumArgs and increase code coverage. 2014-07-27 17:42:56 -07:00
John-David Dalton
8bddb47fab Add test for _.slice where start >= end. 2014-07-27 17:42:56 -07:00
John-David Dalton
b1b462d22b Add/cleanup tests for using methods as a callback for _.map and _.reduce. 2014-07-27 17:42:56 -07:00
John-David Dalton
d5847faaba Add toObject and optimize use of toIterable in _.sample. 2014-07-27 17:42:55 -07:00
John-David Dalton
4c9f3aee74 Make baseSortedIndex handle NaN correctly when comparing numbers. 2014-07-27 17:42:55 -07:00
John-David Dalton
ff4e0cb1c2 Use prefix increment operator where easily done. 2014-07-27 17:42:55 -07:00
John-David Dalton
c159da1fbc Ensure _.toIterable converts primitives to objects for easier detection of callback signatures. 2014-07-25 07:46:08 -07:00
John-David Dalton
d5e55f9dbd Copy ./dist/lodash.$BUILD.js to ./dist/lodash.js for coverage run. 2014-07-24 22:17:21 -07:00
John-David Dalton
642ed4061a Ensure EXPANDO doesn't disable fast properties in v8. 2014-07-24 22:17:21 -07:00
John-David Dalton
5178c3e67f Comma and whitespace nits. [ci skip] 2014-07-24 22:17:21 -07:00
John-David Dalton
e402347d73 Fix placeholder support without metadata. 2014-07-24 22:17:21 -07:00
John-David Dalton
3004c58798 Add guard param doc to _.parseInt. [ci skip] 2014-07-24 22:17:21 -07:00
John-David Dalton
15a44fe650 Make _.random and _.range work as callbacks to _.map. 2014-07-24 22:17:21 -07:00
John-David Dalton
e37a96a94a Make _.parseInt work as a callback to _.map. 2014-07-24 22:17:21 -07:00
John-David Dalton
e475a3b64c Remove unneeded branch of _.slice. 2014-07-24 22:17:21 -07:00
John-David Dalton
663ebd25ea Add more placeholder tests. 2014-07-23 19:52:32 -07:00
John-David Dalton
e6bec0de72 Simplify _.slice. 2014-07-23 19:52:26 -07:00
John-David Dalton
f513effd47 Make Float64Array mock more accurately handle its arg signature. 2014-07-22 22:53:38 -07:00
John-David Dalton
dd05e898cc Fix errors in Android 4.3 tests. 2014-07-22 22:52:44 -07:00
John-David Dalton
49a88e75e6 Fix test fails in Safari 5. 2014-07-22 09:42:34 -07:00
John-David Dalton
14a99471f4 Use a better Float64Array mock. 2014-07-22 09:16:09 -07:00
John-David Dalton
bdbc181e38 Ensure testing array buffers hits all parts of cloneBuffer. 2014-07-22 07:15:38 -07:00
John-David Dalton
133b1151bd Add Float64Array even in the non-bizarro test case. 2014-07-22 00:52:16 -07:00
John-David Dalton
653aab2358 Fix typo in the ArrayBuffer#slice mock for node. 2014-07-22 00:18:40 -07:00
John-David Dalton
13669313d4 Fix ArrayBuffer#slice test mock. 2014-07-21 22:13:27 -07:00
John-David Dalton
e84d79ccf3 Increase typed array coverage for node test runs. 2014-07-21 20:35:39 -07:00
John-David Dalton
34077f9624 Fix html test runner errors. 2014-07-21 20:34:58 -07:00
John-David Dalton
28ba64a4db Another attempt at fixing _.isElement bizarro tests. 2014-07-21 11:54:16 -07:00
John-David Dalton
0eefd3e140 Fix typed array tests in Safari. 2014-07-21 11:53:46 -07:00
John-David Dalton
20bbfc5917 Use the dist/lodash.js build for coveralls so it can map correctly to it. 2014-07-21 09:36:15 -07:00
John-David Dalton
9d6832224e Rebuild dist. 2014-07-21 09:27:30 -07:00
John-David Dalton
2cf17b19dc Cleanup appendHolders. 2014-07-21 08:50:35 -07:00
John-David Dalton
390cf2114a Fix bizarro _.isElement test. 2014-07-21 08:33:49 -07:00
John-David Dalton
8bff019b5d Allow placeholders to be customizable. 2014-07-21 00:36:19 -07:00
John-David Dalton
7d221f3be9 Add doc reference to David Corbacho's post for _.debounce and _.throttle. [ci skip] 2014-07-20 13:26:31 -07:00
John-David Dalton
b8628b9772 Add _.flattenDeep and allow _.template to be called with its legacy options param signature. 2014-07-20 12:38:32 -07:00
John-David Dalton
cda4d9e1b2 Correct isWhitespace docs. [ci skip] 2014-07-20 10:39:53 -07:00
John-David Dalton
f5d7a4d41e Remove unneeded checks in arrayXyz functions. 2014-07-20 10:38:54 -07:00
John-David Dalton
94486302f5 Correct ArrayBuffer bizarro shims. 2014-07-20 10:38:08 -07:00
John-David Dalton
4f4a7409f6 Cleanup isWhitespace use. 2014-07-19 21:42:38 -07:00
John-David Dalton
60f57f9e4b Cleanup prototype references of built-ins and the _.isElement bizarro tests. 2014-07-18 23:59:32 -07:00
Breck Yunits
2f98cd9eb0 Fixed comment typo and refactored duplicate code. 2014-07-18 23:59:18 -07:00
John-David Dalton
f77586f13d Add second part of the bizarro ArrayBuffer#slice tests. 2014-07-18 08:57:21 -07:00
Benjamin Tan
fa82091989 Update test descriptions 2014-07-18 08:49:22 -07:00
John-David Dalton
66e9c68da4 Add bizarro tests for shimmed ArrayBuffer#slice. 2014-07-18 08:49:14 -07:00
John-David Dalton
c97c2fee37 Ensure shallow clones of typed arrays don't clone the buffer. 2014-07-17 06:57:05 -07:00
John-David Dalton
fd03500786 Update tested version of Chrome in readme. [ci skip] 2014-07-17 06:39:39 -07:00
John-David Dalton
83d5c31a0c Update deps in travis.yml. 2014-07-17 06:34:28 -07:00
John-David Dalton
7f19c10da9 Use the correct _.isRegExp for the underscore build. 2014-07-16 11:30:34 -07:00
John-David Dalton
c10ea527a0 Minor doc nit. [ci skip] 2014-07-16 08:57:36 -07:00
John-David Dalton
5a54c1520a Remove nativeIsNaN use from the underscore build of _.isFinite. [closes #633] 2014-07-16 08:49:07 -07:00
Benjamin Tan
3f2732be7b Fix documentation for toIterable
[ci skip]
2014-07-16 20:55:37 +08:00
John-David Dalton
d504b1f90f Add tests for overwriting native Number.isFinite. 2014-07-16 00:19:21 -07:00
John-David Dalton
210dac058d Rebuild dist. 2014-07-15 23:54:00 -07:00
John-David Dalton
ccb3012e5a Remove unused native isNaN reference. 2014-07-15 23:51:18 -07:00
John-David Dalton
c94f2e6f07 Doc tweaks. [ci skip] 2014-07-15 23:51:18 -07:00
John-David Dalton
e31d7178b4 Add tests for "_.pluck" style callbacks to _.max, _.min, and _.uniq. 2014-07-15 23:51:18 -07:00
jrajav
b3a4b8085c Add example to docs for nested template delimiters. [closes #628] [ci skip] 2014-07-15 23:51:18 -07:00
John-David Dalton
b56d7ab9c3 Cleanup test titles for "_.pluck" and "_.where" style callbacks. 2014-07-15 23:51:18 -07:00
John-David Dalton
c63e270921 Remove old docs until new can be generated. [ci skip] 2014-07-15 23:51:17 -07:00
John-David Dalton
cffbae3a13 Minor test cleanup. 2014-07-15 23:51:17 -07:00
John-David Dalton
d2d03228ee Consistent use of wrapped values in test titles. 2014-07-15 23:51:17 -07:00
John-David Dalton
30458fa536 Expand test coverage. 2014-07-15 23:51:17 -07:00
John-David Dalton
0e60831f46 Remove sliceBuffer, add typed array tests, and ensure typed array clones have the correct byteOffset and length. 2014-07-14 08:59:28 -07:00
John-David Dalton
69238bf8e8 Cleanup _.max and _.min. 2014-07-14 07:57:46 -07:00
Benjamin Tan
db483df9a6 Fix issue with cloning typed arrays
Closes #624
2014-07-14 07:52:11 -07:00
Benjamin Tan
1dc95f5d3a Improve tests for ArrayBuffers 2014-07-14 07:52:11 -07:00
John-David Dalton
37caef10b1 Optimize non-array iteration of _.max and _.min when no iterator is provided. 2014-07-14 01:02:11 -07:00
John-David Dalton
381ecd8f70 Fix skipTest count for a _.uniq test. 2014-07-14 00:14:17 -07:00
John-David Dalton
f2a829362b Use == instead of === when comparing functions. 2014-07-13 22:24:33 -07:00
John-David Dalton
fe2e994f2d Cleanup previous commit. 2014-07-13 16:09:49 -07:00
megawac
95ba6bf040 Separate _.uniq isSorted logic to a helper 2014-07-13 16:09:48 -07:00
John-David Dalton
6f937e8958 Simplify coveralls command in travis.yml. 2014-07-13 12:17:46 -07:00
John-David Dalton
12f04650de Ignore isSorted if _.indexOf is customized. 2014-07-13 09:57:58 -07:00
John-David Dalton
f7330cce14 Ensure _.escape, _.escapeRegExp, & _.unescape can replacing multiple characters. 2014-07-12 07:08:49 -07:00
John-David Dalton
ba56f95da8 Use TRAVIS_SECURE_ENV_VARS instead of TRAVIS_PULL_REQUEST. 2014-07-11 09:18:35 -07:00
John-David Dalton
46704724e3 Add comments to _.escape and _.repeat. [ci skip] 2014-07-11 08:57:58 -07:00
John-David Dalton
caadd5bb32 Optimize _.escape, _.escapeRegExp, and _.unescape. 2014-07-11 08:42:52 -07:00
John-David Dalton
faa221f162 Make _.isArguments fallback align with other array-like checks. 2014-07-10 23:54:04 -07:00
John-David Dalton
a814d5438a Tweak _.isXyz method docs. [ci skip] 2014-07-10 23:53:24 -07:00
John-David Dalton
ab43c4cf2a Merge branch 'master' of github.com:lodash/lodash 2014-07-10 21:23:27 -07:00
John-David Dalton
d781e2dfb8 Merge pull request #613 from d10/docs
Fix typos [ci skip]
2014-07-10 20:41:21 -07:00
Benjamin Tan
968ef1560f Fix typos [ci skip] 2014-07-11 11:29:48 +08:00
John-David Dalton
1631ceedb3 Add fast path for objects with a single primitive value back to _.matches and add isStrictComparable helper to reduce _.matches and _.isEqual. 2014-07-10 09:26:20 -07:00
John-David Dalton
884c2af17d Add _.matches benchmark. 2014-07-10 09:05:43 -07:00
John-David Dalton
51ab030541 Remove argCount from _.callback and add getCallback helper. 2014-07-09 13:02:28 -07:00
John-David Dalton
2a1e063641 Cleanup tests and add a _.callback test for argCount. 2014-07-09 08:24:30 -07:00
John-David Dalton
62b3120ffd Merge branch 'master' of github.com:lodash/lodash 2014-07-09 08:07:42 -07:00
John-David Dalton
ea17b3d7c9 Use provide instead of pass to avoid confusing test wording. 2014-07-09 08:06:29 -07:00
John-David Dalton
f3e98fc71c Merge pull request #611 from megawac/patch-1
Test coverage: explicitly setting curry arity.
2014-07-09 08:01:15 -07:00
John-David Dalton
5034e11f22 Merge branch 'master' of github.com:lodash/lodash 2014-07-09 07:56:06 -07:00
John-David Dalton
560473d70b Clarify _.runInContext docs and usage example. [ci skip] 2014-07-09 07:54:51 -07:00
Graeme Yeates
10e53509bd Test coverage: explicitly setting curry arity 2014-07-09 10:46:08 -04:00
John-David Dalton
27afb02482 Merge pull request #610 from megawac/patch-1
Variadic curry test coverage.
2014-07-09 07:38:09 -07:00
Graeme Yeates
07fd0989ea Variadic curry test coverage 2014-07-09 10:28:31 -04:00
John-David Dalton
d7c38aea50 Rebuild dist. 2014-07-09 00:52:09 -07:00
John-David Dalton
20d57e27c9 Minor doc nit. [ci skip] 2014-07-09 00:51:17 -07:00
John-David Dalton
4606c8092f Ensure _.match deep comparison isn't affected by changes to source objects. 2014-07-09 00:51:16 -07:00
John-David Dalton
30f256aad2 Reuse length var in _.compose. 2014-07-09 00:51:16 -07:00
John-David Dalton
1b9dbd0e62 Tweak docs and var names of at, baseAt, and zipObject. 2014-07-09 00:51:16 -07:00
John-David Dalton
225c8871f9 Avoid changes to object affecting the result of a match function. 2014-07-08 09:45:31 -07:00
John-David Dalton
d0333134d5 Add more _.uniq and _.matches tests. 2014-07-08 09:11:14 -07:00
John-David Dalton
b24b8315d3 Fix _.shuffle on small collections. [closes #609] 2014-07-08 08:28:50 -07:00
John-David Dalton
4ddc3b518b Optimize _.shuffle. 2014-07-08 00:40:00 -07:00
John-David Dalton
479a7e441d Use _.isError in _.attempt docs and _.template. 2014-07-07 20:09:30 -07:00
John-David Dalton
af5ae8d656 Move some _.where tests to _.matches. 2014-07-07 12:15:44 -07:00
John-David Dalton
1365882de4 Simplify test condition. 2014-07-07 07:53:33 -07:00
John-David Dalton
7854cd1f94 Avoid fails for workers when testing in Sauce Labs. 2014-07-07 07:53:06 -07:00
John-David Dalton
12a1a14527 Fix tests in old IE. 2014-07-07 07:48:40 -07:00
John-David Dalton
a71cc552c9 Avoid test path for non node/phantom. 2014-07-07 01:51:48 -07:00
John-David Dalton
e42d091502 Change case of constants in test/test.js. 2014-07-07 01:40:55 -07:00
John-David Dalton
d89d5befa0 Add lodashBizarro tests for cloning typed arrays. 2014-07-06 17:05:37 -07:00
John-David Dalton
92e5ae29c9 Add FLOAT64_BYTES_PER_ELEMENT for easier test mocking. 2014-07-06 08:24:58 -05:00
John-David Dalton
65aeb97e3e Increate code coverage for AMD build of the root module. 2014-07-06 08:08:08 -05:00
John-David Dalton
08a9ef1072 Fix test fail in older Firefoxes. 2014-07-05 13:44:07 -05:00
John-David Dalton
9c3f297e97 Rebuild dist. 2014-07-05 11:51:51 -05:00
John-David Dalton
2554871c64 Move _.template comment on .source. [ci skip] 2014-07-05 11:51:05 -05:00
John-David Dalton
404edebdff Cleanup unwrapped chaining tests and add a chaining test for _.attempt. 2014-07-05 07:39:31 -05:00
John-David Dalton
2f2030babf Add _.attempt. 2014-07-05 07:23:54 -05:00
John-David Dalton
b560b35175 Remove test which will now lock up _.times. 2014-07-04 23:12:50 -05:00
John-David Dalton
3063b19e1d Replace "shortcut" with "reference" in code comments. [ci skip] 2014-07-04 15:38:34 -05:00
John-David Dalton
a17fb54c37 Avoid >>> use. 2014-07-04 15:36:32 -05:00
John-David Dalton
c1b8a8594d Bump tested browser versions in test/saucelabs.js. 2014-07-03 12:33:02 -07:00
John-David Dalton
0a7fc6c48c Cleanup error object fork in baseIsEqual. 2014-07-03 12:26:47 -07:00
John-David Dalton
79d59ff9ca Add more docs for metadata. 2014-07-03 09:50:46 -07:00
John-David Dalton
c7d3c78e72 Make _.unzip its own method. 2014-07-03 09:46:39 -07:00
John-David Dalton
d56322a032 Consistent use of undefined with .apply instead of null. 2014-07-02 22:26:09 -07:00
John-David Dalton
aac3c4d5c7 Minor style nits. 2014-07-02 18:20:36 -07:00
John-David Dalton
9ba1ddc2dd Cleanup _.isEqual and make _.where of an empty array match all arrays similar to empty objects matching all objects. 2014-07-02 10:36:42 -07:00
John-David Dalton
61eeaa0496 Minor cleanup. 2014-07-02 09:12:05 -07:00
John-David Dalton
d3b6f9975c Add @type to help the Underscore build method alternatives. [ci skip] 2014-07-01 21:22:52 -07:00
John-David Dalton
5200c8d659 Remove unneeded n validation from _.before. 2014-07-01 12:21:11 -07:00
John-David Dalton
e2c6f57859 Minor test cleanup. 2014-07-01 11:58:09 -07:00
John-David Dalton
b084210705 Add _.before. 2014-07-01 11:57:45 -07:00
John-David Dalton
6622922468 Optimize _.clone. 2014-07-01 09:11:06 -07:00
John-David Dalton
caf31eb6d3 Doc tweaks. [ci skip] 2014-06-30 23:54:50 -07:00
John-David Dalton
464691f129 Optimize _.reduce and _.reduceRight. 2014-06-30 21:24:07 -07:00
Mariano Desanze
afcf539e6e Fix doc typo as _.support.ownLast is false in all but IE < 9. [ci skip] 2014-06-30 14:19:11 -07:00
John-David Dalton
bf2c1a2df2 Fix binary search benchmarks. [ci skip] 2014-06-30 12:59:18 -07:00
John-David Dalton
7400064cd5 Added _.sortedLastIndex and allow _.lastIndexOf to work with sorted arrays and _.sortedLastIndex. 2014-06-30 09:40:55 -07:00
John-David Dalton
7eb3754807 Doc and source cleanup. 2014-06-29 18:13:47 -07:00
John-David Dalton
a9cc2fdb54 Add toIterable to reduce support.unindexedChars use and optimize/simplify methods. [closes #601] 2014-06-29 14:14:16 -07:00
John-David Dalton
212282e77c Rebuild dist. 2014-06-29 01:25:31 -07:00
John-David Dalton
1e8a820108 Split _.every, _.filter, _.map, _.reduce, & _.some into arrayXYZ and baseXYZ forms as well as specialize for _.bind and _.partial. 2014-06-28 23:33:15 -07:00
John-David Dalton
0117341b7e Fix _.template and _.flatten use in perf/perf.js. 2014-06-28 23:33:15 -07:00
John-David Dalton
d21eac8b18 Cleanup _.forEach docs. [ci skip] 2014-06-28 23:33:15 -07:00
Steve Heffernan
af4edc3b76 Updated forEach object example to include the keys. [ci skip] [closes #596]
The forEach object example is a little ambiguous where it says "logs each number", since both the key and value of the object are technically numbers. I've read it a few times now (skipping over the function description of course) and wanted it to be a little more obvious.
2014-06-28 23:33:15 -07:00
John-David Dalton
8a959896bf Reduce code inbaseBind and baseCreateWrapper and optimize _.bind by adding createCtorWrapper. 2014-06-26 09:02:31 -07:00
John-David Dalton
ba5107e801 Add unit tests for _.curryRight. 2014-06-26 09:00:56 -07:00
John-David Dalton
d7de4a3579 Doc tweaks for _.curryRight and basePartial. [ci skip] 2014-06-26 09:00:56 -07:00
John-David Dalton
175b14860e Update Benchmark.js to be compatible with v3.0.0-pre. 2014-06-26 09:00:56 -07:00
John-David Dalton
72fcb4ebda Simplify baseCallback. 2014-06-26 09:00:56 -07:00
John-David Dalton
3a221f9b6e Cleanup _.compose. 2014-06-26 09:00:55 -07:00
Graeme Yeates
1241fb54f3 Simplify _.*RightWhile loops 2014-06-26 09:00:55 -07:00
John-David Dalton
b291dcadc6 Add _.curryRight. 2014-06-26 09:00:55 -07:00
John-David Dalton
4105b19f75 Drop Narwhal from test/run-test.sh and contributing text. [ci skip] 2014-06-26 09:00:55 -07:00
John-David Dalton
b7b8ad7760 Updated tested Node version in readme. [ci skip] 2014-06-26 09:00:55 -07:00
John-David Dalton
8465e3061a Cleanup error messages for jobs that fail to start . 2014-06-26 09:00:55 -07:00
John-David Dalton
6b09cd61d2 Ensure _.keysIn treats primitives like objects and both _.keys and _.keysIn return empty arrays for null and undefined values. 2014-06-22 18:54:19 -07:00
John-David Dalton
aac609cc38 Avoid test fails in IE 9. 2014-06-22 18:54:19 -07:00
John-David Dalton
0b1d16f9db Excuse _.isFinite tests in test/underscore.html. 2014-06-22 16:56:18 -07:00
John-David Dalton
7374f6dc4f Simplify charsLeftIndex and charsRightIndex. 2014-06-22 16:38:23 -07:00
John-David Dalton
9577d80fc2 Simplify _.dropRightWhile, _.dropWhile, _.takeRightWhile, and _.takeWhile. 2014-06-22 16:38:23 -07:00
John-David Dalton
c550e27d21 Ensure _.omit and _.pick work with primitives. 2014-06-22 16:38:23 -07:00
John-David Dalton
423730da76 Make _.isFinite use ES6 Number.isFinite when available. 2014-06-22 16:38:23 -07:00
John-David Dalton
78a4c6f525 Minor whitespace nits. [ci skip] 2014-06-22 16:38:23 -07:00
John-David Dalton
0d3ac21ae0 Fix test in IE. 2014-06-22 16:38:23 -07:00
John-David Dalton
2cae3245aa Make make nullish check consistent in _.isEmpty. 2014-06-22 16:38:22 -07:00
John-David Dalton
e143a0ec6b Make _.isFinite follow ES6 Number.isFinite. 2014-06-22 16:38:22 -07:00
John-David Dalton
35ce087f3b Use Object(...) instead of new String, new Boolean, and new Number. 2014-06-22 16:38:22 -07:00
John-David Dalton
e787bc8ae4 Add semicolons. 2014-06-22 16:38:22 -07:00
John-David Dalton
4937052475 Minor test cleanup. 2014-06-22 00:28:58 -07:00
John-David Dalton
739eb67bec Add _.isError to host object test. 2014-06-22 00:28:58 -07:00
John-David Dalton
a3049b6f94 Ensure _.compose returns a noop function when no arguments are provided. 2014-06-22 00:28:26 -07:00
John-David Dalton
2f1346fefa Add more _.noop use in test.js. 2014-06-22 00:27:47 -07:00
John-David Dalton
f116db3108 Make categories singular. 2014-06-21 21:25:17 -07:00
John-David Dalton
87a8780cca Fix failing tests in older IE related to iteration order. 2014-06-21 15:12:49 -07:00
John-David Dalton
d2de62283b Rename callback params to iterator or customizer where appropriate. 2014-06-21 15:12:49 -07:00
John-David Dalton
11c16139c2 Avoid nullish being treated as plain objects in _.keysIn. 2014-06-21 15:12:49 -07:00
John-David Dalton
1c91ec69ba Simplify _.isObject check in _.trunc. 2014-06-21 15:12:49 -07:00
John-David Dalton
73429e7779 Remove _.isObject use from _.omit and _.pick. 2014-06-21 15:12:48 -07:00
John-David Dalton
fe5aff0c72 More lodash cleanup. 2014-06-21 15:12:48 -07:00
John-David Dalton
c36d29a896 Minor nit in readme. [ci skip] 2014-06-21 15:12:48 -07:00
John-David Dalton
e3b5395905 Remove falsey array check in baseFlatten. 2014-06-21 15:12:48 -07:00
John-David Dalton
3a25ecbbc9 Rework lodash. 2014-06-21 15:12:48 -07:00
John-David Dalton
7d63970293 Remove sorting from _.functions. 2014-06-21 15:12:48 -07:00
John-David Dalton
ee267d23ba Correct _.template use in saucelabs.js. 2014-06-21 15:12:48 -07:00
John-David Dalton
e0e4eed26b Adjust unit tests. 2014-06-19 09:32:13 -07:00
John-David Dalton
5b280bd60d Add excused tests for _.first, _.initial, _.last, _.rest, and _.template. 2014-06-19 09:32:13 -07:00
John-David Dalton
2f9cc91b64 Simplify _.initial. 2014-06-19 09:32:13 -07:00
John-David Dalton
36bcced355 Avoid sort() use in baseFunctions. 2014-06-19 09:32:12 -07:00
John-David Dalton
9a9b17d38d Make _.chain use lodash instead of lodashWrapper. 2014-06-19 09:32:12 -07:00
John-David Dalton
e2cd275ac5 Remove the data param from _.template. 2014-06-19 09:32:12 -07:00
John-David Dalton
61eb5d906c Doc tweaks to _.flatten and other methods. [ci skip] 2014-06-19 09:32:12 -07:00
John-David Dalton
a113dc0861 Remove overloading from _.first, _.last, _.initial, & _.rest. 2014-06-19 09:32:12 -07:00
John-David Dalton
6a164a235d Add methods to the lodash wrapped/unwrapped chaining docs. [ci skip] 2014-06-19 09:32:12 -07:00
John-David Dalton
c1eaa90c2b Move callback above constant. 2014-06-17 10:31:06 -07:00
John-David Dalton
00e00eb7b5 Doc tweaks for boolean params. [ci skip] 2014-06-17 09:16:09 -07:00
John-David Dalton
0d2db28908 Rename _.createCallback to _.callback. 2014-06-17 01:07:04 -07:00
John-David Dalton
20202b793b Remove callback support from _.flatten and make it shallow by default. 2014-06-17 00:59:19 -07:00
John-David Dalton
62e84e73ae Add _.clone and _.flatten tests. 2014-06-17 00:08:33 -07:00
John-David Dalton
73f6fd49d0 Align _.keys with ES6 and coerce primitives to objects. 2014-06-16 12:27:21 -07:00
John-David Dalton
4f9da35b76 Make _.max and _.min return unwrapped values when chaining. 2014-06-16 09:07:47 -07:00
John-David Dalton
cc7b413a2a Update request in travis.yml. 2014-06-16 00:31:14 -07:00
John-David Dalton
fcf29f357d Minor readme nit. [ci skip] 2014-06-16 00:31:08 -07:00
John-David Dalton
4fd1eae84f Fix typo to fix AMD tests. 2014-06-15 18:32:16 -07:00
John-David Dalton
1c770a3c66 Drop testing Node 0.6. and bump in name only to v3.0.0-pre. 2014-06-15 17:07:51 -07:00
John-David Dalton
e152f54903 Make tests work with es6 transpiled code. 2014-06-15 16:18:07 -07:00
John-David Dalton
5d3a9d817a make ui.isModularize set to true if coming from lodash-es6. 2014-06-15 14:24:37 -07:00
John-David Dalton
e884916275 Rebuild dist. 2014-06-15 13:46:51 -07:00
John-David Dalton
5b7b16416b Fix _.zip use with arguments objects. 2014-06-15 13:46:08 -07:00
John-David Dalton
04b93aeaf2 Make object check style consistent. 2014-06-15 11:45:04 -07:00
John-David Dalton
39bdd37615 Correct the resolution of length in _.zip. 2014-06-15 11:45:04 -07:00
John-David Dalton
4ccb3810c2 Make nullish check consistent in variations of _.matches returned function. 2014-06-14 23:21:58 -07:00
John-David Dalton
1065ebb0aa Simplify baseFlatten. 2014-06-14 10:23:26 -07:00
John-David Dalton
74c08de530 Cleanup nonEnumProps assignment. 2014-06-14 10:19:16 -07:00
John-David Dalton
b195fdbf60 Optimize _.matches. 2014-06-13 23:54:33 -07:00
John-David Dalton
f68efe6674 Make _.partial and _.partialRight docs complement each other. [ci skip] [closes #586] 2014-06-13 09:33:33 -07:00
John-David Dalton
ed309182bf Add _.chunk to the features section of the readme. [ci skip] 2014-06-12 23:42:46 -07:00
John-David Dalton
50c6b276f9 Remove _.pluck use from _.zip. 2014-06-12 20:50:47 -07:00
John-David Dalton
4c1a8f358a Add more _.chunk tests. 2014-06-12 09:29:05 -07:00
John-David Dalton
05ff79f347 Avoid using passing in test descriptions. 2014-06-12 09:17:59 -07:00
John-David Dalton
3ae328898d Reduce _.omit. 2014-06-12 09:11:47 -07:00
John-David Dalton
7d35c43def Minor doc / source cleanup. 2014-06-12 08:48:33 -07:00
John-David Dalton
d4f857b739 Move _.chunk to the Arrays category and make it use a default chunkSize of 1. 2014-06-12 08:39:30 -07:00
John-David Dalton
b6bc844b4d Remove support for cloning arrays and make _.isEqual more robust when comparing errors. 2014-06-12 08:38:35 -07:00
John-David Dalton
d06a477371 Add "enumerable" to _.isEmpty doc. [ci skip] 2014-06-11 22:59:30 -07:00
John-David Dalton
c128c029f3 Merge pull request #585 from phated/master
Initial implementation of _.chunk - close #465
2014-06-11 19:00:45 -07:00
Blaine Bublitz
a58ad5006f Initial implementation of _.chunk - close #465 2014-06-11 17:37:06 -07:00
John-David Dalton
3c5655fc3d Rebuild dist. 2014-06-11 12:29:06 -07:00
John-David Dalton
6ab04866ec Fix failing tests. 2014-06-11 12:24:18 -07:00
John-David Dalton
1f07f9d127 Fix _.isEqual test in environment w/o typed arrays. 2014-06-11 12:24:17 -07:00
John-David Dalton
e5ccfc4446 Ensure _.where returns elements that contain all source array values. [closes #583] 2014-06-11 12:24:17 -07:00
John-David Dalton
ec89382e35 Add error object tests to _.isEqual. 2014-06-11 12:24:17 -07:00
John-David Dalton
4a7873ef77 Update tested Firefox in the readme. [ci skip] 2014-06-11 12:24:17 -07:00
John-David Dalton
ff2fd45ff0 Only use ctorByClass if typed array constructor is incorrect. 2014-06-10 20:28:02 -07:00
John-David Dalton
e8cfeec0cf Cleanup tests and ensure the Worker test waits no more than 30 seconds (including retries). 2014-06-10 20:28:02 -07:00
John-David Dalton
c72171d1da Add _.once tests for memorized return values. 2014-06-10 09:50:10 -07:00
John-David Dalton
885b56000b Make less stable tests leverage the retry count of asyncTest. 2014-06-10 09:40:53 -07:00
John-David Dalton
3d1ee9dcf0 Clarify AMD exports comment. [ci skip] 2014-06-09 23:00:32 -07:00
John-David Dalton
5d2133a483 Fix unit test for rhino/ringo. 2014-06-09 09:37:14 -07:00
John-David Dalton
52bb56ba43 Remove support.argsObject. 2014-06-09 02:05:54 -07:00
John-David Dalton
d2edf11726 Ensure _.callback supports binding built-in methods. [closes #576] 2014-06-09 01:40:02 -07:00
John-David Dalton
9a152c23bb Minor _.sortBy doc nit. [ci skip] 2014-06-09 00:17:25 -07:00
John-David Dalton
8572445f57 Optimize _.isEqual by using _.keys and ensure arguments objects are compared correctly. 2014-06-08 19:42:11 -07:00
John-David Dalton
9940d73167 Update requires. 2014-06-07 06:53:02 -07:00
John-David Dalton
8b8a9ae854 Attempt to fix Safari 4. 2014-06-06 15:00:36 -07:00
John-David Dalton
036bf92223 Ensure a byte length is passed. 2014-06-05 07:13:07 -07:00
John-David Dalton
410969743f Avoid subarray for mobile Safari. 2014-06-05 00:47:37 -07:00
John-David Dalton
14da67121c Add Safari 4 to saucelabs.js. 2014-06-05 00:47:25 -07:00
John-David Dalton
681d3e09ba Rebuild dist. 2014-06-04 08:57:01 -07:00
John-David Dalton
0ce130efa7 Cleanup readme and update Opera versions. [ci skip] 2014-06-04 08:56:13 -07:00
John-David Dalton
d14d7ade85 Fix baseIsEqual doc param typo. [ci skip] 2014-06-04 08:56:13 -07:00
John-David Dalton
7b4fd28ef1 Ensure _.merge ignores undefined values of source object properties. [closes #573] 2014-06-04 08:56:13 -07:00
John-David Dalton
b2280b2d72 Fixed _.keys in Safari 5.0.5. 2014-06-02 09:29:40 -07:00
John-David Dalton
b41826c332 Fixed cloneBuffer in PhantomJS. 2014-06-02 09:29:40 -07:00
John-David Dalton
3d93ed9059 Fix failing tests in Safari > 5. 2014-06-02 08:15:19 -07:00
John-David Dalton
35a0756e5a Add fallback for ArrayBuffer#slice. 2014-06-01 23:02:39 -07:00
John-David Dalton
10419366f9 Rename num to n in doc examples. [ci skip] 2014-06-01 23:02:39 -07:00
John-David Dalton
8373d31013 Cleanup readme. [ci skip] 2014-06-01 23:02:39 -07:00
John-David Dalton
0c89a8f145 Remove narwhal from travis.yml testing. 2014-06-01 23:02:39 -07:00
John-David Dalton
257ac4d37e Remove unused vendor files. 2014-05-31 19:38:27 -05:00
John-David Dalton
653aee8b07 Update to version info to 2.5.0-pre. 2014-05-31 19:38:27 -05:00
John-David Dalton
88726aff8c Update readme. [ ci skip] 2014-05-31 19:38:27 -05:00
Alex Elder
baabdb4ac2 Updated README.md
This commit adds links to Lo-Dash documentation under a specific "Documentation" heading, hopefully improving usability for users searching for the API docs.
2014-05-31 19:38:26 -05:00
Benjamin Tan
6277510557 Use Markdown links formatting. [ci skip] 2014-05-31 19:38:26 -05:00
John-David Dalton
e9ab17fcb1 Fix failing test. 2014-05-31 19:38:26 -05:00
John-David Dalton
2f9ba719d4 Add clone tests for array buffers. 2014-05-30 15:27:32 -04:00
John-David Dalton
e259f300b1 Remove unused fork in baseAssign and baseMerge. 2014-05-30 14:58:47 -04:00
John-David Dalton
fcc357ddd1 Source cleanup of onJobStart. 2014-05-30 14:58:36 -04:00
John-David Dalton
e613198af7 Detect sauce error message in result. 2014-05-30 14:58:08 -04:00
John-David Dalton
e3c1214971 Fix test stability. 2014-05-30 13:15:32 -04:00
John-David Dalton
1c3f9f7fbf Ensure tests that timeout are marked as errors. 2014-05-30 13:06:06 -04:00
John-David Dalton
f4a1573586 Rename _.truncate to _.trunc to align with ES6. 2014-05-30 13:04:56 -04:00
John-David Dalton
95db668c3c Make reError more robust and leverage console.log sugar more. 2014-05-30 10:03:06 -04:00
John-David Dalton
691e21fa78 Delay status completion until there is a valid job ID. 2014-05-28 16:38:27 -04:00
John-David Dalton
c555681c8b Add extra object in doc examples of _.assign and _.defaults. [ci skip] 2014-05-28 15:35:00 -04:00
John-David Dalton
ae7ef24196 Minor source nit in test/test.js. 2014-05-28 15:23:40 -04:00
John-David Dalton
f935b141f1 Fix test typo. 2014-05-28 15:23:40 -04:00
John-David Dalton
a893d43d16 Move test error catching code before any other script files. 2014-05-28 15:23:40 -04:00
John-David Dalton
7cb47c8494 Add chaining tests to string methods. 2014-05-27 23:21:03 -04:00
John-David Dalton
5ef4c763b6 Add chaining tests. 2014-05-26 16:56:15 -06:00
John-David Dalton
459b5bd89c Adjust callback arg counts and fast paths. 2014-05-26 07:17:35 -07:00
John-David Dalton
c5237a926d Update vendor. 2014-05-25 23:55:59 -07:00
John-David Dalton
2e5052a7fa Bump the tested Opera version in readme. [ci skip] 2014-05-25 23:10:39 -07:00
John-David Dalton
cd8d9bf07c Ensure _.isEqual works on error objects and add tests for cloning and comparing errors and typed arrays. 2014-05-25 23:10:08 -07:00
John-David Dalton
7da022ebb4 Consistent test order. 2014-05-25 15:39:54 -07:00
John-David Dalton
67f9c7e0f0 Code cleanup and removal of ctorByClass. 2014-05-25 13:18:13 -07:00
John-David Dalton
1812d557b6 Minor doc nit. [ci skip] 2014-05-25 12:32:15 -07:00
John-David Dalton
34cde430a5 Add private isArrayLike helper and add object classifications for typed arrays with support for cloning and comparing them. 2014-05-25 12:24:32 -07:00
John-David Dalton
12a6b58614 Fix _.throttle doc typo. [ci skip] 2014-05-25 09:14:02 -07:00
John-David Dalton
cb81fccfaf Lots of doc tweak removing heavy will use. [ci skip] 2014-05-24 18:33:05 -07:00
John-David Dalton
1ce0fffd25 Add a cancel function to debounced functions. [closes #567] 2014-05-24 14:39:53 -07:00
John-David Dalton
0c1c4b08c7 Fix doc typo. [ci skip] 2014-05-23 23:45:45 -07:00
Mathias Bynens
c875b61003 Make _.escape escape backticks as well
In Internet Explorer ≤ 8, the backtick character can be used to break out of unquoted attribute values or HTML comments. See http://html5sec.org/#102, http://html5sec.org/#108, and http://html5sec.org/#133.
2014-05-23 10:38:05 +02:00
John-David Dalton
f4b34c8ca5 Make _.isEqual callback test circular. 2014-05-22 23:28:05 -07:00
John-David Dalton
a6b4b5e30c Update tested Chrome version in readme. [ci skip] 2014-05-22 23:08:32 -07:00
John-David Dalton
64fb8f0c53 Remove trailing comma to fix test fails in old IE. 2014-05-21 16:43:13 -07:00
John-David Dalton
78a312f61c Rebuild dist. 2014-05-21 16:07:19 -07:00
John-David Dalton
2c6c4426e8 Fix jashkenas/underscore#1621. 2014-05-21 16:06:06 -07:00
John-David Dalton
a9df0601a6 Enhance callback args tests for _.clone, _.cloneDeep, and _.isEqual. 2014-05-21 00:20:05 -07:00
John-David Dalton
4345f353a0 Fix callback use with _.isEqual. 2014-05-21 00:20:05 -07:00
John-David Dalton
96b525658e Cleanup optionToValue. 2014-05-21 00:20:05 -07:00
John-David Dalton
9525952573 Avoid variable assignments in return statements. 2014-05-21 00:20:05 -07:00
John-David Dalton
76828a87ee Optimize _.every and _.some and cleanup _.callback, _.forEach, and _.forEachRight. 2014-05-21 00:20:05 -07:00
John-David Dalton
789eb59904 Correct .npm folder permissions in travis.yml. 2014-05-21 00:20:05 -07:00
John-David Dalton
c0265f8fd9 Add _.runInContext doc example. 2014-05-21 00:20:05 -07:00
John-David Dalton
891ebb8ff6 Attempt to detect more false test errors. 2014-05-21 00:20:05 -07:00
John-David Dalton
1111c20d54 Simplify reWords. 2014-05-19 08:51:33 -07:00
John-David Dalton
387176e83d Add baseAssign, baseBindAll, baseInvoke, basePick, basePullAt, and createAssigner. 2014-05-19 01:03:22 -07:00
John-David Dalton
80a38b285d Punt on AMD testing for Android because of stability issues. 2014-05-19 01:03:22 -07:00
John-David Dalton
aa0c02a243 Avoid retrying the tunnel more times than allowed. 2014-05-19 01:03:22 -07:00
John-David Dalton
3c5932af75 Update Underscore tests and excuse tests for edge features from the Underscore build. 2014-05-19 01:03:22 -07:00
John-David Dalton
f40a7d47f5 Simplify .gitattributes. [ci skip] 2014-05-19 01:03:22 -07:00
John-David Dalton
f85543c7ff Only retry a test if it errors not because of unit test fails. 2014-05-19 01:03:21 -07:00
John-David Dalton
36d2ff7c3b Update qunit-extras assert expected count appropriately and fix typo. 2014-05-19 01:03:21 -07:00
John-David Dalton
7ba673ed89 Rename arrayRef to arrayProto for consistency. 2014-05-16 02:18:14 -07:00
John-David Dalton
a0cba79df2 Excuse assert count expected error in Backbone and add support for excusing them qunit-extras. 2014-05-16 02:18:14 -07:00
John-David Dalton
c91e8d7aa7 Avoid a false fail in slower Ringo (and other slower environments). 2014-05-16 02:18:14 -07:00
John-David Dalton
e85b0a81ba Minor style nit in test.js. 2014-05-16 02:18:13 -07:00
John-David Dalton
bfc40498bd Update vendors. 2014-05-16 02:18:13 -07:00
Benjamin Tan
41ac7062f8 Minor comment and code style fixes 2014-05-15 19:04:06 -07:00
John-David Dalton
71c19b566b Tweak escaping sourceURL in docs. [ci skip] 2014-05-15 19:04:06 -07:00
John-David Dalton
0de72f3abb Add compileFunction. 2014-05-15 19:04:06 -07:00
John-David Dalton
ce3c78d30b Ensure tunnel stops when jobs are completed. 2014-05-15 19:04:06 -07:00
John-David Dalton
7152308c25 Use result job_id instead of parsing the url and ensure tunnel can restart if the tunnel failed to start. 2014-05-15 19:04:06 -07:00
John-David Dalton
cd838d4902 Add tunnel timeout support. 2014-05-15 19:04:06 -07:00
John-David Dalton
f7799eee59 Avoid unneeded index var in baseBind. 2014-05-15 19:04:06 -07:00
John-David Dalton
247718bc6c Update sauce-tunnel. 2014-05-15 19:04:06 -07:00
John-David Dalton
6b5521fbf7 Rename testId to taskId. 2014-05-15 19:04:06 -07:00
John-David Dalton
13e00379ae Cleanup baseIsEqual and baseMerge. 2014-05-13 08:58:01 -07:00
John-David Dalton
347663716c Null _timerId in Job#status. 2014-05-13 08:58:01 -07:00
John-David Dalton
69415ea966 Update tested Firefox version on Sauce. 2014-05-13 08:58:01 -07:00
John-David Dalton
6c71e3c583 Pass more callback args to custom callbacks of _.clone, _.cloneDeep, and _.isEqual. 2014-05-13 08:58:01 -07:00
John-David Dalton
06861ceb55 Add Job#resetting flag. 2014-05-13 08:58:01 -07:00
John-David Dalton
6e286473ab Add more logInline calls and move state flag assignment higher in methods. 2014-05-13 08:58:00 -07:00
John-David Dalton
6091219aaf Split out stop and reset events in Tunnel#restart. 2014-05-13 08:58:00 -07:00
John-David Dalton
76cee1287a Ensure jobs are reset before the tunnel is closed. 2014-05-13 08:58:00 -07:00
John-David Dalton
ff138c6d47 Null out the descriptor.value after using it in setData. 2014-05-12 07:49:20 -07:00
Benjamin Tan
a89f8b8098 Add $ signs to bash prompts 2014-05-12 07:49:20 -07:00
John-David Dalton
f4009a9944 Make recursive test expand to _.debounce too. 2014-05-12 07:49:20 -07:00
John-David Dalton
16b479d21e Fix jobUrl typo in saucelabs.js. 2014-05-12 07:49:20 -07:00
John-David Dalton
0f8c20c3ab Add ui.isForeign, add guards for Worker tests, and remove Dojo loader filter from test. 2014-05-12 07:49:20 -07:00
John-David Dalton
d5c3b258f3 Rename assignDefaultsOwn to assignOwnDefaults and remove createAssigner and defaultsOwn. 2014-05-11 03:49:41 -07:00
John-David Dalton
ee4a703407 Add createAssigner, defaultsOwn, and expand the callback args of _.assign and _.merge. 2014-05-11 02:35:46 -07:00
John-David Dalton
e901208721 Fix typo in _.times docs. [ci skip] [closes #549] 2014-05-09 08:46:56 -07:00
John-David Dalton
5deb7371ab Rebuild dist. 2014-05-09 02:32:14 -07:00
John-David Dalton
f999195f47 Style nit on the IIFE used with mixin. 2014-05-09 02:31:25 -07:00
John-David Dalton
9b920cf813 Add baseFunctions to ensure _.mixin only iterates over own keys of source objects. 2014-05-09 02:31:25 -07:00
John-David Dalton
4155e8e0ce Add a doc note for iterating inherited properties to _.bindAll and _.functions. [ci skip] 2014-05-09 02:31:25 -07:00
John-David Dalton
b583530c66 Simplify memoize doc example. [ci skip] 2014-05-07 01:32:21 -07:00
John-David Dalton
43c13c22a8 Make _.memoize skip the __proto__ key. 2014-05-07 00:40:27 -07:00
John-David Dalton
32167b45ce Ensure _.pullAt ignores non-index values. 2014-05-07 00:12:12 -07:00
John-David Dalton
f09ae1e2e3 Fix url parsing. 2014-05-06 23:03:22 -07:00
John-David Dalton
086e1e1a74 Fix resolving job ids. 2014-05-06 21:49:33 -07:00
John-David Dalton
1020637d79 Merge pull request #541 from danallison/master
Fix old `pullAt` doc example. [ci skip]
2014-05-06 10:56:43 -07:00
Dan Allison
9c30d69d55 Fix old pullAt example 2014-05-06 10:16:51 -07:00
John-David Dalton
ff673f053b Use String instead of +'' for consistent style. 2014-05-06 09:20:44 -07:00
John-David Dalton
2514987d3e Comment nit. [ci skip] 2014-05-06 08:44:35 -07:00
John-David Dalton
e332a916b0 Add debug. 2014-05-06 08:14:19 -07:00
John-David Dalton
5eb7faec29 Specify Node 0.11.11 to avoid 0.11.13 which isn't compatible with istanbul. 2014-05-06 06:08:34 -07:00
John-David Dalton
8cfebee922 Remove id check from Job#stop. 2014-05-06 05:21:11 -07:00
John-David Dalton
f4a22f8aef Add Job#remove to remove old jobs when restarting. 2014-05-06 05:13:45 -07:00
John-David Dalton
5fd641e8c7 Add _.pullAt to features section of readme. [ci skip] 2014-05-04 19:24:43 -07:00
John-David Dalton
4cde537a7f Cleanup initialization of Job and Tunnel instances. 2014-05-04 16:13:07 -07:00
John-David Dalton
56ee4c1ae5 Remove unnecessary this binding and emit register restart callbacks so they execute sooner. 2014-05-04 16:04:24 -07:00
John-David Dalton
1874ad2ff2 Correct typo in Job#reset. 2014-05-04 15:39:50 -07:00
John-David Dalton
907ed641bf Use the chrome sauce browser identifier in place of googlechrome. 2014-05-04 13:49:54 -07:00
John-David Dalton
a23ccd863d Message format nit for logging retries. [ci skip] 2014-05-04 13:10:50 -07:00
John-David Dalton
8d145d7a32 Make threshold account for job batch sizes smaller than the throttled amount. 2014-05-04 12:28:49 -07:00
John-David Dalton
4a0419e554 Rebuild dist. 2014-05-04 10:44:25 -07:00
John-David Dalton
f23a458319 Fix typo in _.pullAt. 2014-05-04 10:43:43 -07:00
John-David Dalton
1e324103cc Tweak docs for _.at, _.omit, and _.pick. [ci skip] 2014-05-04 10:43:43 -07:00
John-David Dalton
85d8ced299 Add baseAt to reduce _.at and _.pullAt. 2014-05-04 10:43:43 -07:00
John-David Dalton
0631b8f052 Whitespace nit. 2014-05-04 02:57:22 -07:00
John-David Dalton
649994464c Tweak docs for _.pull, _.pullAt, and _.remove. [ci skip] 2014-05-04 02:57:22 -07:00
John-David Dalton
8c618780b7 Rename _.removeAt to _.pullAt. [closes #490] 2014-05-04 02:57:07 -07:00
Dan Allison
0dc2e8994b use else instead of continue 2014-05-04 02:51:55 -07:00
Dan Allison
d25ab4f204 use more descriptive variable name 2014-05-04 02:51:54 -07:00
Dan Allison
ff26080c5c fix _.removeAt with repeated indexes 2014-05-04 02:51:54 -07:00
Dan Allison
95bd2dde19 add removeAt function
(cherry picked from commit 06b3eae373484618b58f70f3cd6ecda319bfd977)
2014-05-04 02:50:23 -07:00
John-David Dalton
6ad31a5441 Restart tunnel if all *active* jobs have restarted. 2014-05-03 23:35:18 -07:00
John-David Dalton
702a82bb38 Remove args var from _.at. 2014-05-03 22:05:26 -07:00
John-David Dalton
a5e91385b0 Expand the excuse window of load errors to 3 seconds or more. 2014-05-03 21:55:18 -07:00
John-David Dalton
4c690b9d4c Make documented args names of methods that accept more than one plural. [ci skip] 2014-05-03 21:44:43 -07:00
John-David Dalton
695d6e14d4 Remove _.at guard for _.map use. 2014-05-03 21:42:19 -07:00
John-David Dalton
c19f87134e Restart tunnel if all jobs have restarted. 2014-05-03 21:41:02 -07:00
John-David Dalton
3de50e8dd4 Emit restart events for Job and Tunnel. 2014-05-03 21:28:19 -07:00
John-David Dalton
fb20dae0a8 Whitespace nits. [ci skip] 2014-05-03 21:27:32 -07:00
John-David Dalton
0f8db11f53 Restrict script load error excusal a bit. 2014-05-03 07:55:11 -07:00
John-David Dalton
e3f94156f1 Update tested version of Firefox in readme. [ci skip] 2014-05-03 06:30:30 -07:00
John-David Dalton
cf468fc4d1 Update tested version of Node in readme. [ci skip] 2014-05-03 00:27:59 -07:00
John-David Dalton
849cf30b95 Rebuild dist. 2014-05-03 00:27:41 -07:00
John-David Dalton
d08febc711 Avoid reporting tests to Sauce Labs when errors occur to force a retry. 2014-05-03 00:16:15 -07:00
John-David Dalton
53bfafb84c Add doc note to _.defaults for a deep version. [ci skip] [closes #154] 2014-05-02 22:49:36 -07:00
John-David Dalton
40809e40c2 Fix _.partialRight doc example. [ci skip] [closes #540] 2014-05-02 22:33:17 -07:00
John-David Dalton
925197ae09 Add doc note on Firefox OS certified apps. [ci skip] 2014-05-02 21:41:25 -07:00
John-David Dalton
07f72de63d Use _.partial where applicable. 2014-05-02 20:55:59 -07:00
John-David Dalton
f17f62b532 Move SauceTunnel callbacks out of Tunnel#start and Tunnel#stop and use util.inherits. 2014-05-02 20:50:32 -07:00
John-David Dalton
b97bbe0572 Add Jobs#reset. 2014-05-02 19:38:10 -07:00
John-David Dalton
9e4cc7fdbc Reduce flag checking. 2014-05-02 19:37:48 -07:00
John-David Dalton
7dcb56ea5c Reset jobs when tunnel restarts. 2014-05-02 11:24:53 -07:00
John-David Dalton
a814c6d152 Fix restarting tunnels. 2014-05-02 09:35:09 -07:00
John-David Dalton
cbe3a0fde7 Add running flag to Job and Tunnel. 2014-05-02 08:48:32 -07:00
John-David Dalton
7e375370fa Fix Tunnel#stop. 2014-05-02 07:42:41 -07:00
John-David Dalton
1d149b100b Add state checks to test/saucelabs.js. 2014-05-02 01:44:18 -07:00
John-David Dalton
1bce75ed53 Add the ability to retry sauce tunnel connections. 2014-05-02 01:22:03 -07:00
John-David Dalton
d8a72fe797 Update travis deps to use ^ version indicator instead of ~. 2014-05-01 09:29:01 -07:00
John-David Dalton
5bd8319f99 Add retry limit to sauce retry message. 2014-05-01 08:52:20 -07:00
John-David Dalton
d8221b880b Remove unused color from ansiCodes. 2014-05-01 08:51:35 -07:00
John-David Dalton
1316ce5ca8 Fix dequeue. 2014-05-01 02:55:11 -07:00
John-David Dalton
d5562767a2 Cleanup test titles. 2014-05-01 01:33:02 -07:00
John-David Dalton
1a03ee8b9b Ensure _.callback doesn't error if provided a nullish func argument and a thisArg. 2014-05-01 01:32:47 -07:00
John-David Dalton
d07e53e9a0 Add Job#restart and Job#stop to test/saucelabs.js. 2014-05-01 00:47:26 -07:00
John-David Dalton
04160e6acc Make logInline treat nullish values as an empty string. 2014-05-01 00:22:03 -07:00
John-David Dalton
6f4c7ca171 Add job throttle to test/saucelabs.js. 2014-04-30 21:07:51 -07:00
John-David Dalton
2d397efcf5 Add placeholders note to the features section of the readme. [ci skip] 2014-04-30 09:24:58 -07:00
John-David Dalton
ba8e59e1bd Keep skipping placeholder tests for modularized builds. 2014-04-30 09:11:31 -07:00
John-David Dalton
568faa526f Rebuild dist. 2014-04-30 08:48:37 -07:00
John-David Dalton
b761fbaabe Fix _.mixin doc typo. 2014-04-30 08:46:25 -07:00
John-David Dalton
4a493a96d7 Remove isPreBuild checks from test/test.js. 2014-04-30 08:46:25 -07:00
John-David Dalton
601244ba74 Update formatting for tested browsers in readme. [ci skip] 2014-04-30 08:20:07 -07:00
John-David Dalton
d606197264 Try to use the tunnel-identifier key. 2014-04-30 08:20:07 -07:00
John-David Dalton
1fee10e167 Only apply idleTimeout to queued jobs. 2014-04-30 08:20:07 -07:00
John-David Dalton
674802abe4 Make _.mixin chainable and make it assign to this instead of hard coding assignment to lodash. 2014-04-30 00:11:45 -07:00
John-David Dalton
179422a84b Add more _.where tests. 2014-04-29 19:15:09 -07:00
John-David Dalton
5c9e4685db _.where should perform a partial comparison of *all* objects within arrays of source. [closes #536] 2014-04-29 09:28:56 -07:00
John-David Dalton
c59f8c734a Apply idle-timeout to queued jobs too. 2014-04-29 08:18:36 -07:00
John-David Dalton
d2fa2be5af Fix doc typos fourty to forty. [ci skip] 2014-04-29 08:18:36 -07:00
Max Bucknell
2d3d66e9d1 Fix spelling mistake 2014-04-29 08:18:36 -07:00
John-David Dalton
21713801ad Add some debug. 2014-04-29 01:51:49 -07:00
John-David Dalton
598e2adebe Adjust modern build testing for older Android. 2014-04-29 00:38:56 -07:00
John-David Dalton
8bbb84fdc7 Try to stabilize sauce results. 2014-04-29 00:17:51 -07:00
John-David Dalton
59b7bc7b98 Correct browserName output. 2014-04-28 23:35:51 -07:00
John-David Dalton
55d52be3c2 Add missing comma in test/saucelabs.js. 2014-04-28 10:21:36 -07:00
John-David Dalton
3aa4e45bdb Rebuild dist. 2014-04-28 09:03:21 -07:00
John-David Dalton
534976e64f Cleanup platforms in test/saucelabs.js. 2014-04-28 08:43:43 -07:00
John-David Dalton
3efa9d2030 Remove IIFE in test/saucelabs.js. 2014-04-28 08:41:24 -07:00
John-David Dalton
2c4657355f Ensure that _.transform checks that object is an object before using it as the accumulator [[Prototype]]. 2014-04-28 08:39:35 -07:00
John-David Dalton
68702ca43f More _.isObject cleanup. 2014-04-28 08:34:54 -07:00
John-David Dalton
54a0de9b52 Make _.merge align with _.assign exit early snippet. 2014-04-28 08:31:54 -07:00
John-David Dalton
94832f3f81 Simplify _.defaults. 2014-04-28 08:31:06 -07:00
John-David Dalton
fb00ba9efd Cleanup _.isObject and _.isRegExp. 2014-04-28 08:30:32 -07:00
John-David Dalton
96736cf1de Tweak _.max, _.min, and trim helper comments. [ci skip] 2014-04-28 08:29:43 -07:00
John-David Dalton
834c55ec6f Add _.escapeRegExp, pad, & trim tests. 2014-04-28 08:28:13 -07:00
John-David Dalton
6528a434ce Add / to characters escaped by _.escapeRegExp 2014-04-28 08:27:47 -07:00
John-David Dalton
a24ee0a331 Update vendor/qunit-extras. 2014-04-28 00:47:21 -07:00
John-David Dalton
e86144bb06 Try mobile browsers with sauce rest api. 2014-04-27 12:01:05 -07:00
John-David Dalton
ce7cb16cfe Rebuild dist. 2014-04-27 11:44:11 -07:00
John-David Dalton
754bafc069 Add doc examples for _.max and _.min for +/-Infinity. [ci skip] 2014-04-27 11:41:09 -07:00
John-David Dalton
7eff6fde7c Avoid RegExp#teat error in older Opera. 2014-04-27 11:41:09 -07:00
John-David Dalton
626dac600a Add more DOM element tests. 2014-04-27 11:41:08 -07:00
John-David Dalton
f1b2d4340d Move the dom/function check up in baseIsEqual. 2014-04-26 08:02:16 -07:00
John-David Dalton
aea4d73e61 Cleanup throbber interval in vendor/qunit-extras. 2014-04-26 08:02:10 -07:00
John-David Dalton
3d6c74ead1 Add list of modern browser version ranges to readme. [ci skip] 2014-04-25 10:06:22 -07:00
John-David Dalton
c606f80fe3 Clarify _.uniq docs on callback. [ci skip] 2014-04-25 10:06:04 -07:00
John-David Dalton
250ca36f05 Ensure _.max and _.min return the correct value when callback computes +/-Infinity. 2014-04-25 07:21:10 -07:00
John-David Dalton
4c63be066f Change wording to retry. 2014-04-24 09:55:17 -07:00
John-David Dalton
b559eeb7e6 Try documented tunnel identifier key over undocumented one. 2014-04-23 23:24:44 -07:00
John-David Dalton
a9742dbdc6 Update ecstatic sauce test dep. 2014-04-23 23:24:38 -07:00
John-David Dalton
5feaade1c7 Correct attempt count in test/saucelabs.js. 2014-04-21 21:49:43 -07:00
John-David Dalton
31747dfecd Rebuild dist. 2014-04-20 13:41:36 -07:00
John-David Dalton
eda9484413 Allow getIndexOf to work when there is no external _.indexOf defined. 2014-04-20 13:40:05 -07:00
John-David Dalton
7e904c1d15 Update tested browsers in sauce. 2014-04-20 13:40:05 -07:00
John-David Dalton
5f8527ba04 Ensure error objects from iframes are tested. 2014-04-20 13:40:05 -07:00
John-David Dalton
082e95b700 Increase test coverage. 2014-04-20 13:40:05 -07:00
John-David Dalton
aef5c61415 Fix missing comma in test/test.js. 2014-04-20 13:40:05 -07:00
John-David Dalton
68fdac532f Liberal use of parentheses. 2014-04-19 12:18:14 -07:00
John-David Dalton
f718284538 Ensure _.keys and _.keysIn always skip the constructor property on prototype objects. 2014-04-19 11:55:07 -07:00
John-David Dalton
966283dd6d Minor test cleanup. [ci skip] 2014-04-19 11:55:07 -07:00
John-David Dalton
0f3ec9ad73 Newline nits. [ci skip] 2014-04-19 11:55:07 -07:00
John-David Dalton
cb685904ef Add _.isError to the features section of the readme. [ci skip] 2014-04-19 11:55:06 -07:00
John-David Dalton
5bf545ee90 Cleanup _.isError and add more tests. 2014-04-19 09:48:51 -07:00
Mike Pennisi
b018ada5c8 Implement _.isError 2014-04-19 09:48:51 -07:00
John-David Dalton
976e81be43 Update vendor/qunit-extras. 2014-04-18 09:24:47 -07:00
John-David Dalton
694cb18256 Add an error message to each TypeError. 2014-04-18 09:12:52 -07:00
John-David Dalton
a715a5fa37 Don't designate \x85 as whitespace. 2014-04-17 21:42:43 -07:00
John-David Dalton
1e10c9d508 Remove more native trim test scaffolding . 2014-04-17 21:42:43 -07:00
John-David Dalton
2aacfea8ea Update tested Chrome version in readme. [ci skip] 2014-04-17 21:42:43 -07:00
John-David Dalton
43c2cb4ba8 Remove unneeded lodashBizarro tests. 2014-04-17 07:33:14 -07:00
John-David Dalton
c93f708bc8 Add whitespace tests. 2014-04-17 07:33:14 -07:00
John-David Dalton
353416a088 Treat \x85 as whitespace. 2014-04-17 07:33:14 -07:00
John-David Dalton
93b98abb8d Remove native trim, trimLeft, & trimRight use. 2014-04-17 07:33:14 -07:00
John-David Dalton
5e28e38c98 Fix assert count. 2014-04-17 07:33:14 -07:00
John-David Dalton
0e828e5b3b Ensure _.difference works with arrays regardless of arg position. 2014-04-16 08:50:16 -07:00
John-David Dalton
c331d12678 Add _.difference, _.intersection, and _.xor tests. 2014-04-16 08:34:11 -07:00
John-David Dalton
f0817b2461 Whitespace nits in test/test.js. [ci skip] 2014-04-16 08:33:16 -07:00
John-David Dalton
d3f2cd5321 Add _.intersection and _.union tests. 2014-04-16 00:25:36 -07:00
John-David Dalton
7017766591 Rebuild dist. 2014-04-15 23:21:37 -07:00
John-David Dalton
841890c178 Add tests for _.pluck, _.findWhere, and _.where for their key or source arguments. 2014-04-15 23:19:39 -07:00
John-David Dalton
4f5189b0dd Use _.noop more in test/test.js. 2014-04-15 23:04:24 -07:00
John-David Dalton
250ecd13bd Avoid != in createCallback. 2014-04-15 22:41:01 -07:00
John-David Dalton
34133b094b Ensure pluck always used property and findWhere and where always use matches. 2014-04-15 22:40:26 -07:00
John-David Dalton
75c3939c88 Simplify _.isEmpty. 2014-04-15 22:13:28 -07:00
John-David Dalton
cb44430a3f Update underscore tests and vendor again. 2014-04-15 17:51:30 -07:00
John-David Dalton
be88b5aba2 Fix error in Firefox < 4. 2014-04-15 17:39:27 -07:00
John-David Dalton
3d0f7b8e7e Make more underscore tests pass. 2014-04-15 09:24:16 -07:00
John-David Dalton
a53d5dc791 Prevent test fails for the npm build. 2014-04-15 02:17:07 -07:00
John-David Dalton
7f1164b6a6 Remove _.isObject use from _.findWhere and _.where. 2014-04-15 01:36:01 -07:00
John-David Dalton
2174f10db5 Excuse invalid underscore _.intersection tests. 2014-04-15 01:21:55 -07:00
John-David Dalton
e3c218092c Add _.findWhere as its own method. 2014-04-15 01:17:55 -07:00
John-David Dalton
cf73ba2905 Update other vendors. 2014-04-15 01:02:14 -07:00
John-David Dalton
d653b951e3 Update vendor/underscore and underscore tests. 2014-04-15 01:01:18 -07:00
John-David Dalton
900c0eafac Use matched instead of found in docs. [ci skip] 2014-04-15 00:56:58 -07:00
John-David Dalton
bf6eaaf625 Make _.where work with empty sources. 2014-04-14 23:11:11 -07:00
John-David Dalton
32f3d214cb Rebuild dist. 2014-04-14 21:39:55 -07:00
John-David Dalton
cd62b2a209 Add more tests for null thisArg arguments. 2014-04-14 21:35:10 -07:00
John-David Dalton
ff25b4cb46 Ensure resolver provided to _.memoize is a function if it's truthy. 2014-04-14 21:33:45 -07:00
John-David Dalton
5c07dd995e Use arrayEach for baseClone, baseMerge, and transform. 2014-04-14 19:53:30 -07:00
John-David Dalton
f54cc28a43 Move doc node from shimIsPlainObject to _.isPlainObject. [ci skip] 2014-04-14 09:01:42 -07:00
John-David Dalton
9b1c7bb1e3 More doc tweaks. [ci skip] 2014-04-13 23:06:17 -07:00
John-David Dalton
ffe8a729b7 Add doc note to _.isPlainObject for objects created by Object.create(null). [closes #526] [ci skip] 2014-04-13 19:03:56 -07:00
John-David Dalton
a47f356021 Cleanup tests. 2014-04-13 19:03:09 -07:00
John-David Dalton
7d7a34c733 Increase code coverage when testing AMD modules. 2014-04-13 16:12:08 -07:00
John-David Dalton
e306959ebe Ensure _.matches is tested against sources with more than one property too. 2014-04-13 00:36:40 -07:00
John-David Dalton
ce16c4d37f Update narwhal, rhino, and ringo source links in travis.yml. 2014-04-12 23:53:18 -07:00
John-David Dalton
565cc05b48 Avoid strict comparison to function reference in _.callback test. 2014-04-12 23:51:55 -07:00
John-David Dalton
287839e498 Add test for custom _.indexOf methods, _.contains, and objects. 2014-04-12 18:57:39 -07:00
John-David Dalton
4be0969098 Rebuild dist. 2014-04-12 17:35:18 -07:00
John-David Dalton
f1008b1abf Simplify _.contains. Thanks @phated. 2014-04-12 17:35:04 -07:00
John-David Dalton
8d8b3c2194 Inline partitionInitializer. 2014-04-12 17:15:17 -07:00
John-David Dalton
6631b57fc0 Case nit in test/saucelabs.js. 2014-04-12 16:51:31 -07:00
John-David Dalton
88b4bc3753 Add comment blocks and browserName helper to test/saucelabs.js. 2014-04-12 01:59:10 -07:00
John-David Dalton
23a4dde10f Update sauce-tunnel require call. 2014-04-12 01:33:00 -07:00
John-David Dalton
5a47eb8559 Rebuild dist. 2014-04-12 01:03:27 -07:00
John-David Dalton
81cd990052 Remove source initialization from matches. 2014-04-12 01:02:58 -07:00
John-David Dalton
dd9e7cf665 Update sauce-tunnel in travis.yml. 2014-04-12 00:57:24 -07:00
John-David Dalton
b2f50b5327 Add mutation notes to _.pull and _.remove. [ci skip] 2014-04-12 00:22:14 -07:00
John-David Dalton
b21fe4b2fc Fix semicolon/comma typo. 2014-04-12 00:00:11 -07:00
John-David Dalton
5f23a3143c Whitespace nits. 2014-04-11 23:48:56 -07:00
John-David Dalton
ef136c9d00 Doc nit for _.pairs. [ci skip] 2014-04-11 23:24:45 -07:00
John-David Dalton
c7e8b724c7 Add arrayEach, arrayEachRight and arrayMap helpers. 2014-04-11 23:24:09 -07:00
John-David Dalton
0243e7ba8b Add partitionInitializer helper. 2014-04-11 23:23:20 -07:00
John-David Dalton
b3f5375283 Ensure functions created by _.matches don't error when comparing falsey object values. [closes #523] 2014-04-10 03:05:08 -07:00
John-David Dalton
f90f683be5 Add doc note to _.isEqual about not supporting comparing DOM nodes or functions. [ci skip] 2014-04-10 01:20:23 -07:00
John-David Dalton
bd23666b45 Ensure _.contains works with a fromIndex for objects. 2014-04-10 00:54:27 -07:00
John-David Dalton
a620c2ec1a Add more falsey value tests. 2014-04-09 09:27:35 -07:00
John-David Dalton
a723612141 Add null and undefined values tests for thisArg. 2014-04-08 08:57:26 -07:00
John-David Dalton
2d7d4212c1 Minor comment nit. [ci skip] 2014-04-08 01:29:55 -07:00
John-David Dalton
52cca034cf Add more _.callback tests. 2014-04-08 01:21:21 -07:00
John-David Dalton
79ec1f5a02 Add JSON.stringify test. 2014-04-08 00:44:20 -07:00
John-David Dalton
68729a9696 Test format cleanup. 2014-04-08 00:43:38 -07:00
John-David Dalton
93383204b3 Rebuild dist. 2014-04-07 09:24:36 -07:00
John-David Dalton
78f17bd083 Add toJSON alias of valueOf. [closes #521] 2014-04-07 09:23:40 -07:00
John-David Dalton
ea87006150 Remove unneeded @type tag from the underscore build. [ci skip] 2014-04-07 00:33:45 -07:00
John-David Dalton
c0027c377b Avoid var conflicts in the support IIFE in minified builds. 2014-04-06 17:39:41 -07:00
John-David Dalton
77b84c1de0 Use ok when appropriate in test/test.js. 2014-04-06 16:16:39 -07:00
John-David Dalton
a14e2fedcf More doc tweaks. [ci skip] 2014-04-06 11:30:47 -07:00
John-David Dalton
0341399e54 Merge pull request #520 from d10/docs
Fix doc typos. [ci skip]
2014-04-06 11:19:05 -07:00
Benjamin Tan
1dcf3585fb Fix typos [ci skip] 2014-04-06 21:47:01 +08:00
John-David Dalton
dbb48cf086 Newline nit fixed by lodash-cli patch. [ci skip] 2014-04-05 23:12:42 -07:00
John-David Dalton
064c8adcf2 Add more _.endsWith and _.startsWith tests. 2014-04-05 00:36:32 -07:00
John-David Dalton
cff83e095a Make _.where return all elements when the props object is empty. 2014-04-05 00:35:43 -07:00
John-David Dalton
ff9aecca48 Add _.startsWith and _.endsWith tests. 2014-04-04 09:07:39 -07:00
John-David Dalton
53c529a12c Cleanup tests. 2014-04-04 09:07:11 -07:00
John-David Dalton
78454ba876 Add more -Infinity, NaN, and Infinity tests. 2014-04-04 00:37:12 -07:00
John-David Dalton
c3c1702d2b Change _.forEach to _.each in tests. 2014-04-04 00:27:43 -07:00
John-David Dalton
bffc777b58 Tweak support property comments and nonEnumArgs test. 2014-04-03 01:31:55 -07:00
John-David Dalton
fcec6a8fdf Replace equal with strictEqual and fix ok test typo. 2014-04-02 19:01:36 -07:00
John-David Dalton
a842f25f89 Rebuild dist. 2014-04-02 02:48:10 -07:00
John-David Dalton
9f2bea8ac1 Wrap support.nonEnumArgs assignment in a try-catch to avoid errors in Ringo, Rhino, and Narwhal. 2014-04-02 02:46:34 -07:00
John-David Dalton
7f9a2a2d34 Ensure _.initial and _.last work with NaN values for n. 2014-04-02 00:40:23 -07:00
John-David Dalton
3225f17f5a Comment and cleanup support properties. 2014-04-01 23:28:56 -07:00
John-David Dalton
2f8b1dff27 Add noglobals=true to some sauce test runs in travis.yml. 2014-04-01 23:28:56 -07:00
John-David Dalton
7884f972ea Remove unused index var and prevent leaking keyIndex var. 2014-04-01 23:28:56 -07:00
John-David Dalton
bfce264537 Cover nonEnumArgs in modern builds too. 2014-04-01 02:04:58 -07:00
John-David Dalton
dee5f4c96a Rebuild dist. 2014-03-31 23:56:37 -07:00
John-David Dalton
6bd83137fb Only check indexes for arrays in _.keysIn dense array support. 2014-03-31 20:57:38 -07:00
John-David Dalton
6c6c38679a Add _.keys and _.keysIn tests. 2014-03-31 20:57:38 -07:00
John-David Dalton
ca0c700afa More adjustments to coerced values. 2014-03-29 19:15:21 -07:00
John-David Dalton
cc2e434f3d Avoid unnecessarily coercing start to a number. 2014-03-29 19:15:21 -07:00
John-David Dalton
4d337f0bee Fix typo in _.once test. 2014-03-29 19:15:21 -07:00
John-David Dalton
539c10883b Add placeholder tests to for _.bindKey. 2014-03-29 19:15:21 -07:00
John-David Dalton
ae8796a570 Tweak var names in _.once tests. 2014-03-29 19:15:20 -07:00
John-David Dalton
141227d846 Add placeholder support to _.curry. 2014-03-29 02:14:27 -07:00
John-David Dalton
bb42b87f4e Make nativeMax style consistent. 2014-03-29 02:14:27 -07:00
John-David Dalton
866d9dacb6 Add isPreBuild flag and cleanup tests. 2014-03-29 02:14:27 -07:00
John-David Dalton
006e32077c Add _.support.nonEnumStrings and coerce key to a number in _.keysIn and shimKeys. 2014-03-28 02:06:40 -07:00
John-David Dalton
0aca1c6c7c Cleanup fromIndex coercions. 2014-03-28 00:24:17 -07:00
John-David Dalton
d906d56505 Add _.keys test for string objects. 2014-03-27 22:17:16 -07:00
John-David Dalton
3b9ebf358c Simplify _.camelCase and add tests. 2014-03-27 22:17:16 -07:00
John-David Dalton
1c643cda5b Remove unused vars. 2014-03-27 13:13:56 -07:00
John-David Dalton
e5697a8070 Ensure _.camelCase handles acronyms and numbers. 2014-03-27 09:22:17 -07:00
John-David Dalton
07f1a13cbf Remove Bitdeli badge. [ci skip] 2014-03-26 19:10:31 -07:00
John-David Dalton
4c88f3ad64 Remove tab as a character to escape in template strings. 2014-03-26 09:02:17 -07:00
John-David Dalton
c099d60393 Fix test title typos. [ci skip] 2014-03-26 02:49:11 -07:00
John-David Dalton
5e0d48b40f Tweak _.union tests. 2014-03-26 02:26:32 -07:00
John-David Dalton
c4f8e83d02 Cleanup test wording. 2014-03-26 02:26:06 -07:00
John-David Dalton
a768c1e6c0 Add _.intersection test for working with only secondary arguments. 2014-03-26 02:24:52 -07:00
John-David Dalton
540325dc20 Rebuild dist. 2014-03-26 02:07:08 -07:00
John-David Dalton
2e57f76c12 Fix perf regression in _.intersection. 2014-03-26 02:03:54 -07:00
John-David Dalton
e71fd6f8b4 Avoid formal param use in _.difference. 2014-03-26 02:03:54 -07:00
John-David Dalton
c721721fc5 Ensure sparse arrays are treated as dense by _.keys and _.keysIn and ensure support for string objects in _.keys and _.keysIn. 2014-03-25 09:26:20 -07:00
John-David Dalton
0ab5d6a7b8 Merge branch 'master' of github.com:lodash/lodash 2014-03-25 07:30:07 -07:00
John-David Dalton
66599e5770 Merge pull request #510 from d10/docs
More doc cleanup. [ci skip]
2014-03-25 07:27:12 -07:00
Benjamin Tan
d7c7463380 Improve docs [ci skip] 2014-03-25 22:13:15 +08:00
Benjamin Tan
491a4468dc Formalize all instances of meta data as metadata [ci skip] 2014-03-25 22:11:57 +08:00
John-David Dalton
c85150aaea Merge branch 'master' of github.com:lodash/lodash 2014-03-24 22:22:20 -07:00
John-David Dalton
c7ba6d2a82 Update link to curry post in readme. [ci skip] 2014-03-24 22:11:54 -07:00
John-David Dalton
ace64cf50f Merge pull request #509 from d10/chain
Simplify `_.chain`.
2014-03-24 21:57:14 -07:00
John-David Dalton
cd6d4f6f47 Merge pull request #508 from d10/docs
Docs improvements. [ci skip]
2014-03-24 21:48:17 -07:00
Benjamin Tan
1bdf74951a Simplify _.chain 2014-03-25 11:30:06 +08:00
Benjamin Tan
eda2b38f46 Update Underscore license year [ci skip] 2014-03-25 11:26:12 +08:00
Benjamin Tan
f14e85d6c4 Update docs [ci skip] 2014-03-25 11:25:10 +08:00
John-David Dalton
76f668dddd Add tests for _.map, _.invoke, _.shuffle, and _.sortBy for treating numbers as empty. 2014-03-24 09:14:28 -07:00
John-David Dalton
ce01d696a0 Add _.isEqual test for arguments objects and tweak phantom detection. 2014-03-23 16:31:35 -07:00
John-David Dalton
8179a3a349 Rebuild dist. 2014-03-23 15:00:02 -07:00
John-David Dalton
e5c397203e Fix baseIsEqual in Rhino, Ringo, Narwhal. 2014-03-23 14:59:46 -07:00
John-David Dalton
60aeba732d Adjust _.camelCase, _.kebabCase and _.snakeCase doc examples and tests. 2014-03-23 14:38:39 -07:00
John-David Dalton
de70ef1ef6 Remove a and b use from baseIsEqual. 2014-03-23 14:20:05 -07:00
John-David Dalton
1d02c288b3 Avoid a, b variable names and cleanup _.isEqual docs. 2014-03-22 23:18:54 -07:00
John-David Dalton
3776920807 Update vendor/jquery 2014-03-21 21:22:00 -07:00
John-David Dalton
7d54cde8eb Add chalk to test/saucelabs.js. 2014-03-21 01:01:37 -07:00
John-David Dalton
1bab2061bd Avoid ^ caret use in travis until they update npm. 2014-03-20 20:56:24 -07:00
John-David Dalton
34e30cba0d More cleanup in test/saucelabs.js. 2014-03-20 19:32:31 -07:00
John-David Dalton
ed600c9077 Comment nit. [ci skip] 2014-03-19 23:46:52 -07:00
John-David Dalton
30dc6d2b19 Rewrite test/saucelabs.js. 2014-03-19 19:31:45 -07:00
John-David Dalton
77c3b4636e Update supported Firefox version in readme. [ci skip] 2014-03-18 22:43:53 -07:00
John-David Dalton
25edcbaff9 Rebuild dist. [ci skip] 2014-03-18 22:43:19 -07:00
John-David Dalton
553b8fb2e0 Add Underscore _.now test to the excused list. 2014-03-17 07:51:21 -07:00
John-David Dalton
461b401e28 Remove unneeded parenthesis from .travis.yml. 2014-03-17 01:21:46 -07:00
John-David Dalton
d2a4611d1e Update vendor/backbone and vendor/requirejs. 2014-03-17 00:43:13 -07:00
John-David Dalton
65c3dbba2c Update .travis.yml dependencies. 2014-03-17 00:20:51 -07:00
John-David Dalton
7ef0b5b428 Remove legacy and mobile from .gitignore. [ci skip] 2014-03-16 23:41:03 -07:00
John-David Dalton
89589d7ef5 Add doc notes for deprecated arguments of _.first, _.initial, _.last, and _.rest. [ci skip] 2014-03-16 20:56:00 -07:00
John-David Dalton
70b782c7e7 Use the argument predicate instead of func for _.negate. 2014-03-16 18:20:42 -07:00
John-David Dalton
9732b0a636 Add more methods to the features section of the README. [ci skip] 2014-03-16 18:01:35 -07:00
John-David Dalton
00acaa56b9 Update tested Chrome version range in README. [ci skip] 2014-03-16 17:15:47 -07:00
John-David Dalton
1cea2be9c1 Rebuild dist. 2014-03-16 14:51:21 -07:00
John-David Dalton
94381bd899 Clarify _.isEmpty and add tests for array-like objects for _.isEmpty and _.size. 2014-03-16 14:48:02 -07:00
John-David Dalton
23d935d7ec Add maxSafeInteger to tests and rename LARGE_ARRAY_SIZE to largeArraySize. 2014-03-16 14:48:02 -07:00
John-David Dalton
69da13b261 Simplify _.find by having it use _.findIndex. 2014-03-16 14:48:02 -07:00
John-David Dalton
a6519e0ff7 Whitespace nit. [ci skip] 2014-03-16 14:48:02 -07:00
John-David Dalton
b701a36e21 Comment nits. [ci skip] 2014-03-16 11:08:17 -07:00
John-David Dalton
24a34088d8 Add baseFind to simplify _.find, _.findLast, _.findKey, _.findLastKey. 2014-03-16 11:07:20 -07:00
John-David Dalton
0eeb092aad Add large array test for _.intersection that tests large arrays combined with missing arguments. 2014-03-16 01:27:05 -07:00
John-David Dalton
7d4726d12e Cleanup large array tests. 2014-03-16 01:01:09 -07:00
John-David Dalton
e13bf164ea Rebuild dist. 2014-03-15 04:02:03 -07:00
John-David Dalton
07434b19ae Ensure find methods work with strings. 2014-03-15 04:00:14 -07:00
John-David Dalton
819fa88eb7 Ensure _.find and _.findLast pass "Collections" tests for the compat build. 2014-03-15 02:41:37 -07:00
John-David Dalton
95976814f5 Add array-like tests for "Collections" methods. 2014-03-15 02:40:55 -07:00
John-David Dalton
0a2dd2a330 Avoid returning assignDefaults if no object is provided to _.defaults. 2014-03-15 01:21:43 -07:00
John-David Dalton
65f125d998 Allow null or undefined elements in _.pluck, _.property, and _.invoke. 2014-03-15 01:21:43 -07:00
John-David Dalton
7a2f6ebfd5 Remove toLength. 2014-03-14 09:43:22 -07:00
John-David Dalton
5d89fa3f07 Rebuild dist. 2014-03-14 01:32:19 -07:00
John-David Dalton
4a66e28584 Tweak support.nonEnumArgs assignment. 2014-03-14 01:30:30 -07:00
John-David Dalton
85990bbeb3 Add toLength helper. 2014-03-14 01:25:57 -07:00
John-David Dalton
e0311e1530 Cleanup ticks in method docs. [ci skip] 2014-03-14 01:12:34 -07:00
John-David Dalton
6eb4dbf9cd Add slow path note to _.times with thisArg benchmark. [ci skip] 2014-03-14 00:48:33 -07:00
John-David Dalton
a90453461e Adjust fromIndex and length coercions. 2014-03-13 09:28:38 -07:00
John-David Dalton
7e04c9a909 Fix the Underscore build of _.random. 2014-03-13 01:27:22 -07:00
John-David Dalton
e51602ccfa Update vendor/qunit-extras. 2014-03-13 00:33:33 -07:00
John-David Dalton
ca7adb59db Rebuild dist. 2014-03-13 00:18:13 -07:00
John-David Dalton
3a12802a4b Use shorthand for package.json "repository" field. [ci skip] 2014-03-13 00:10:11 -07:00
John-David Dalton
c770eab3e3 Move _.range to the Utilities category. 2014-03-13 00:03:45 -07:00
John-David Dalton
079b8e7337 Reduce _.find, _.findLast, and _.defaults. 2014-03-12 23:50:55 -07:00
John-David Dalton
2e4593eee7 Update vendors benchmark.js and qunit-extras. 2014-03-12 09:27:51 -07:00
John-David Dalton
3ca80a7bf3 Ensure _.slice coerces start and end arguments appropriately. 2014-03-12 09:11:29 -07:00
John-David Dalton
a4c15e5fa5 Add doc examples for isXyz methods. [ci skip] 2014-03-12 00:37:39 -07:00
John-David Dalton
a40748e3aa Add _.range tests for NaN values for start and end arguments. 2014-03-12 00:30:01 -07:00
John-David Dalton
029aac8059 Cleanup type coercions. 2014-03-12 00:29:31 -07:00
John-David Dalton
2970f66218 Add chars test for pad methods. 2014-03-11 01:04:42 -07:00
John-David Dalton
ef238de7a7 Rebuild dist. 2014-03-11 00:57:48 -07:00
John-David Dalton
af05313dc5 Add unit tests for _.camelCase, _.kebabCase, and _.snakeCase. 2014-03-10 23:57:32 -07:00
John-David Dalton
df0d1b57a0 Fix _.camelCase with consecutive capitalized words. 2014-03-10 23:57:24 -07:00
John-David Dalton
23cff25ed5 Make the code style in test.js consistent. 2014-03-10 23:55:28 -07:00
John-David Dalton
c70b13a650 Clamp indexes and lengths where appropriate. 2014-03-10 21:59:09 -07:00
John-David Dalton
a51c6a7670 Fix minified compat/modern builds. 2014-03-10 09:34:13 -07:00
John-David Dalton
0bdb643e14 Close _.difference test coverage gap. 2014-03-10 01:14:11 -07:00
John-David Dalton
0cbbbf1287 Tweak wording on tests for options objects. [ci skip] 2014-03-10 01:13:34 -07:00
John-David Dalton
9a00b62d28 Add _.pad, _.padLeft, _.padRight, _.repeat, and _.truncate tests. 2014-03-10 01:12:27 -07:00
John-David Dalton
05dce760d6 Ensure _.truncate doesn't truncate strings if they are equal to the given length. 2014-03-10 01:11:08 -07:00
John-David Dalton
4eaf91c3dc Optimize _.without in IE. 2014-03-09 20:58:46 -07:00
John-David Dalton
818c3d6140 Add the development underscore build to the test-ui dropdown list. 2014-03-09 20:28:04 -07:00
John-David Dalton
5e19cd0084 Remove legacy/mobile tests. 2014-03-09 20:23:59 -07:00
John-David Dalton
7b06257955 Remove legacy and mobile builds from travis.yml tests. 2014-03-09 18:23:00 -07:00
John-David Dalton
2af21c8003 Remove duplicate isArguments method and movenegate to the "Functions" category. 2014-03-09 12:56:17 -07:00
John-David Dalton
db6f907946 Correct underscore builds. 2014-03-09 12:25:33 -07:00
John-David Dalton
125ed8bff2 Add object values to secondary arguments tests for _.difference, _.intersection, _.union, and _.xor. 2014-03-09 12:25:19 -07:00
John-David Dalton
1d0f2e9d31 Rebuild dist. 2014-03-08 19:59:39 -08:00
John-David Dalton
43efc930f4 Use args in _.merge where possible. 2014-03-08 19:51:17 -08:00
John-David Dalton
737e18d2de Ensure _.intersection handles non-array secondary values correctly. 2014-03-08 16:36:05 -08:00
John-David Dalton
445445603f Remove _.isObject dep from _.merge and ensure _.assign and _.defaults don't error when object is null or undefined and source objects are provided. 2014-03-08 13:16:47 -08:00
John-David Dalton
5957c94958 Use _.constant where possible to cleanup tests. 2014-03-08 12:59:11 -08:00
John-David Dalton
1c41661712 Add npm package.json scripts entry to echo testing instructions. [ci skip] 2014-03-08 01:08:45 -08:00
John-David Dalton
1b2909605e Further reduce browser ranges to test in readme. [ci skip] 2014-03-07 23:50:21 -08:00
John-David Dalton
c6a13f970f Remove iteratorTemplate and compiled methods. 2014-03-07 23:28:55 -08:00
John-David Dalton
f2f57dc5a5 Deopt _.invoke. 2014-03-06 00:45:01 -08:00
John-David Dalton
c6de1ab56c Add _.negate, _.keysIn and _.valuesIn. 2014-03-06 00:42:51 -08:00
John-David Dalton
0392e37eed Lots of doc tweaks. [ci skip] 2014-03-06 00:22:21 -08:00
John-David Dalton
f630c4ec6c Reduce browser ranges to test in readme. [ci skip] 2014-03-05 08:35:00 -08:00
John-David Dalton
e668642b23 Fix newly added string methods/docs. 2014-03-05 01:23:20 -08:00
John-David Dalton
c4c0c050af Make_.dropRight, _.dropRightWhile, _.takeRight, and _.takeRightWhile their own methods. 2014-03-04 09:40:48 -08:00
John-David Dalton
b4ff8360ba Add more string methods to the features note in readme. [ci skip] 2014-03-04 01:21:54 -08:00
John-David Dalton
708a2ec703 Minor whitespace nits. [ci skip] 2014-03-04 01:17:20 -08:00
John-David Dalton
407cb2f7e6 Rebuild dist. 2014-03-04 01:03:23 -08:00
John-David Dalton
0b22e76b85 Separate out _.drop, _.dropWhile, _.take, and _.takeWhile and modify docs to use "predicate" where appropriate. 2014-03-04 01:03:23 -08:00
John-David Dalton
7671187160 Change truey to truthy in docs. [ci skip] 2014-03-04 01:03:00 -08:00
John-David Dalton
5695e0e6b6 Escape a few more characters for in _.escapeRegExp for better narwhal/ringo/rhino support. 2014-03-03 09:18:49 -08:00
John-David Dalton
e22b2f00dc Rebuild dist files. [ci skip] 2014-03-03 01:49:30 -08:00
John-David Dalton
2a017c3a7c Add support for _.camelCase, _.endsWith, _.escapeRegExp, _.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase, _.startsWith, and _.truncate. [closes #425] 2014-03-02 23:48:48 -08:00
John-David Dalton
ce65c3113a Simplify component.json. 2014-03-02 13:47:07 -08:00
John-David Dalton
65a2ebb8ad Don't send test coverage results to coveralls for pull requests. 2014-03-01 00:46:44 -08:00
John-David Dalton
f0a542b154 Add to lodash chaining doc note. [ci skip] 2014-02-28 19:45:54 -08:00
John-David Dalton
dfe1c940bc Add partial application in _.bind to _.curry partial combo test. 2014-02-27 00:18:50 -08:00
John-David Dalton
3cd8708368 Build docs & dist including whitespace adjustments. 2014-02-26 00:30:27 -08:00
John-David Dalton
e677161e49 Remove more code from the Underscore build. 2014-02-25 08:44:33 -08:00
John-David Dalton
818c6711d8 Cleanup _.first, _.initial, _.last, and _.rest. 2014-02-24 22:40:26 -08:00
John-David Dalton
f60cc76f3e Reduce the Underscore build. 2014-02-24 22:39:56 -08:00
John-David Dalton
685321fdc5 Rebuild docs and dist. 2014-02-24 08:55:49 -08:00
John-David Dalton
303215d42f Add common case paths to _.difference and _.uniq. 2014-02-24 08:52:11 -08:00
John-David Dalton
f313752888 Update large array benchmarks in perf.js. [ci skip] 2014-02-23 21:59:16 -08:00
John-David Dalton
28b83a486e Add placeholder support tests for _.bind. 2014-02-22 20:59:02 -08:00
John-David Dalton
80289bd452 Update the tested node version in readme. [ci ckip] 2014-02-22 19:20:31 -08:00
John-David Dalton
054be39feb Add a test for _.uniq with isSorted. 2014-02-22 19:20:14 -08:00
John-David Dalton
6448e049d1 Tweak ticks around "callback" in test titles. [ci skip] 2014-02-22 19:16:00 -08:00
John-David Dalton
8e1f7c8d6f Rebuild docs and dist. 2014-02-22 18:12:34 -08:00
John-David Dalton
c4e31e7a58 Minor comment nits for -0 and +0. [ci skip] 2014-02-22 18:04:26 -08:00
John-David Dalton
0860d9712e Add test to ensure _.flatten returns empty arrays for non array-like objects. 2014-02-22 17:19:20 -08:00
John-David Dalton
1a17cbd26b Cleanup the callback assignment in _.clone and _.cloneDeep. 2014-02-22 17:11:22 -08:00
John-David Dalton
c2b1d3b551 Add falsey value optimizations for baseDifference, baseFlatten, baseUniq, _.flatten, and _.uniq. 2014-02-22 17:10:34 -08:00
John-David Dalton
d4fac798fc Optimize _.isEqual for primitives. 2014-02-22 17:08:28 -08:00
John-David Dalton
b009b23245 Merge pull request #486 from rexxars/indexby-thisarg-docfix
Fixed `_.indexBy` `thisArg` example in documentation. [ci skip]
2014-02-22 10:03:19 -08:00
Espen Hovlandsdal
f276f1e2f5 Fixed _.indexBy() thisArg example in documentation 2014-02-22 11:43:21 +01:00
John-David Dalton
154e57748f Cleanup low and high assignment in _.sortedIndex. [ci skip] 2014-02-21 23:42:40 -08:00
John-David Dalton
6854fee73e Remove array and object pools. 2014-02-21 22:26:17 -08:00
John-David Dalton
24240bfba4 Simplify baseUniq. 2014-02-21 18:01:49 -08:00
John-David Dalton
40e32daabe Fix _.template doc typo. [closes #484] [ci skip] 2014-02-21 08:32:15 -08:00
John-David Dalton
008cbc8972 Add the version of Underscore our underscore build aligns to in readme. [ci skip] 2014-02-20 22:46:42 -08:00
John-David Dalton
8a1d2b614a Templates should not reference _.escape if "escape" delimiters are not used. [closes #484] 2014-02-20 22:31:42 -08:00
John-David Dalton
b79d03d9a4 Reorganize _.template tests. 2014-02-20 22:08:29 -08:00
John-David Dalton
83fb9f84ed Rebuild docs & dist. 2014-02-18 23:10:31 -08:00
John-David Dalton
c634830b9f Reduce passing arguments to helper functions by converting them to arrays. 2014-02-18 22:49:37 -08:00
John-David Dalton
24edd68833 Fix compseArgs and composeArgsRight and cleanup and correct partial placeholder tests. 2014-02-16 16:06:16 -08:00
John-David Dalton
6913798250 Fix doc typos in _.template. [ci skip] 2014-02-16 01:06:27 -08:00
John-David Dalton
131bd2c2cd Cleanup tests. 2014-02-15 22:03:33 -08:00
John-David Dalton
55ae55c803 Add more details to the _.template docs. [ci skip] [closes #472] 2014-02-15 19:28:19 -08:00
John-David Dalton
63f0eea70c Fix AMD test fails for Underscore builds. [ci skip] 2014-02-15 18:29:01 -08:00
John-David Dalton
38aeef0760 Update Backbone tests. 2014-02-15 15:22:41 -08:00
John-David Dalton
88d5f5d76c Update Backbone tests to 1.1.1. 2014-02-15 14:32:56 -08:00
John-David Dalton
486ba5fe0a Avoid packages config for monolithic modules in tests. 2014-02-15 14:22:09 -08:00
John-David Dalton
76f85389ae Update underscore builds. 2014-02-15 13:39:28 -08:00
John-David Dalton
3d311496e0 Remove placeholder support from non-underscore builds. 2014-02-15 13:39:03 -08:00
John-David Dalton
fdbfe0f84b Update vendor/curl. 2014-02-15 01:17:11 -08:00
John-David Dalton
8a25592904 Update test files to work with underscore builds defined as named amd modules. 2014-02-15 01:17:00 -08:00
John-David Dalton
7edf024c71 Fix test fails in Rhino. 2014-02-14 01:36:25 -08:00
John-David Dalton
ee4d9890e7 Add placeholder support to _.bind, _.partial, and _.partialRight. 2014-02-14 01:36:15 -08:00
John-David Dalton
9cc06a94ec Add a module id of "underscore" to the Underscore build. 2014-02-14 00:06:08 -08:00
John-David Dalton
dd6dc1d334 Test cleanup. 2014-02-13 22:29:25 -08:00
John-David Dalton
fb2bafb49e Ensure _.throttle & _.debounce work if the system time is set backwards. 2014-02-13 22:26:26 -08:00
Benjamin Tan
bc3b8e73fe Fix minor typo [ci skip] 2014-02-13 00:16:53 -08:00
John-David Dalton
4d48441102 Tweak features bullets in readme. [ci skip] 2014-02-12 19:51:14 -08:00
John-David Dalton
c0fa980f70 Add new feature notes to its section in readme. [ci skip] 2014-02-12 09:15:58 -08:00
John-David Dalton
bb3bac9933 Remove extra var from createWrapper. 2014-02-11 23:52:34 -08:00
John-David Dalton
1ac5fa544b Update qunit-extras to respect QUnit.config.hidepassed. 2014-02-11 23:35:29 -08:00
John-David Dalton
91bb4d4b00 Remove node 0.6 fix from travis.yml as travis-ci now does it for us. 2014-02-11 21:20:04 -08:00
John-David Dalton
aecdd0fdd5 Add _.matches test and cleanup _.property and _.constant tests. 2014-02-11 21:07:28 -08:00
John-David Dalton
2e5f3cd25c Cleanup docs in _.matches and _.where. [ci skip] 2014-02-11 21:06:58 -08:00
John-David Dalton
8558c55284 Add v8 issue note to parseInt and make other v8 issue use the same protocol. [ci skip] 2014-02-11 19:00:01 -08:00
John-David Dalton
b16b49aea4 Fix copyright header in lodash.compat.js and lodash.min.js files. [ci skip] 2014-02-11 18:23:06 -08:00
John-David Dalton
09678eeef4 Update Underscore version in doc header. [ci skip] 2014-02-11 17:53:17 -08:00
John-David Dalton
fad43842a4 Rebuild docs and dist. 2014-02-11 00:39:05 -08:00
John-David Dalton
4b448a877c Update vendor/underscore to v1.6.0. 2014-02-11 00:38:32 -08:00
John-David Dalton
f090af2292 Rename _.match to _.matches. 2014-02-11 00:35:05 -08:00
John-David Dalton
7faaac94dd Update vendor/bechmark.js. [ci skip] 2014-02-11 00:35:05 -08:00
John-David Dalton
dae0b25717 Revert allowing _.omit and _.pick to work as a callback for _.map when combined with _.partialRight to be solved with _.partial placeholders in v3. 2014-02-10 00:32:10 -08:00
John-David Dalton
de3d9dca72 Minor doc tweaks to _.partition and _.zip. [ci skip] 2014-02-09 00:32:58 -08:00
John-David Dalton
a91abb3e8d Add _.partition. 2014-02-08 23:27:04 -08:00
John-David Dalton
dabea8b972 Update vendors. 2014-02-08 19:00:37 -08:00
John-David Dalton
dedffb3560 Reduce code in doc code examples. [ci skip] 2014-02-08 18:51:08 -08:00
John-David Dalton
5eb2306e9a Remove sauce labs hook, global_test_results, to add it to QUnit Extras. 2014-02-07 21:26:28 -08:00
John-David Dalton
8a2e06a713 Simplify _.every and _.some. 2014-02-06 09:06:35 -08:00
John-David Dalton
23b495aee8 Fix _.every test in perf/perf.js. 2014-02-06 09:05:41 -08:00
John-David Dalton
b9d314e64c Rebuild dist/docs. 2014-02-05 22:21:47 -08:00
John-David Dalton
5a4826e660 Optimize _.callback. 2014-02-05 22:05:03 -08:00
John-David Dalton
20bf67d352 Cleanup _.result. 2014-02-05 21:31:56 -08:00
John-David Dalton
8b4f1e1383 Fix basename in perf/perf.js. [ci skip] 2014-02-05 09:03:31 -08:00
John-David Dalton
20297e359d Rebuild docs/dists and update tested browsers in readme. 2014-02-05 00:05:05 -08:00
John-David Dalton
de7409fd07 Ensure functions can be used as default values for _.result. 2014-02-04 23:50:37 -08:00
John-David Dalton
8498f12a9d Avoid setting arity/processing args if func is not passed to methods like _.bind. 2014-02-04 23:02:32 -08:00
John-David Dalton
e949eb8623 Minor nit, add default greeting to bind benchmark. [ci skip] 2014-02-04 22:59:05 -08:00
John-David Dalton
201d17bc31 Allow _.omit and _.pick to work as a callback for _.map when combined with _.partialRight. 2014-02-04 00:57:26 -08:00
John-David Dalton
143e9bd210 Reduce code samples for _.assign and _.defaults. [ci skip] 2014-02-03 21:32:41 -08:00
John-David Dalton
9ec874d8a6 Add _.isEqual test for being used as a callback for _.every. 2014-02-03 21:32:02 -08:00
John-David Dalton
2543afebf1 Optimize _.invoke for arrays. 2014-02-02 19:45:39 -08:00
John-David Dalton
81a859604c Update vendors and the tested Node version in the readme. [ci skip] 2014-02-02 17:54:27 -08:00
John-David Dalton
d3be4bba37 Add _.isEqual test to ensure regexes are compared regardless of flag order. 2014-02-02 00:01:27 -08:00
John-David Dalton
6779c9eb36 Reduce the complexity of a minor Underscore build optimization. 2014-01-31 09:12:50 -08:00
John-David Dalton
733da570c8 Revert the backtick escape/unescape patch but keep the docs. 2014-01-31 02:05:43 -08:00
John-David Dalton
65258d5b6a Add doc note about escaping backticks. [ci skip] 2014-01-31 01:52:38 -08:00
John-David Dalton
618c8bb5ad Add ` as a character to escape/unescape and a doc note on unquoted html attribute values. 2014-01-30 09:38:01 -08:00
John-David Dalton
ba8684dfc7 Rebuild /dist files. 2014-01-30 08:46:51 -08:00
John-David Dalton
36a1bd9e0f Move browser field in package.json. [ci skip] 2014-01-30 08:46:34 -08:00
John-David Dalton
fe56c1c6f2 Make default BUILD="compat" in travis.yml. [ci skip] 2014-01-30 08:43:35 -08:00
John-David Dalton
86a37e6f8d Minor whitespace nits. [ci skip] 2014-01-30 01:37:17 -08:00
John-David Dalton
da1aad7b92 Add baseEachRight and baseForOwnRight. 2014-01-30 01:36:30 -08:00
John-David Dalton
876621f8af Merge pull request #466 from aearly/patch-1
Add "browser" field in package.json for Browserify. [ci kip]
2014-01-29 13:50:46 -08:00
Alexander Early
8a908b720f Add "browser" field for Browserify
Browserify and other CJS builders will look for a "browser" field to use as an alternate "main" when targeting the browser environment.

https://github.com/substack/node-browserify#packagejson

Pointing it to the compat build would prevent issues like #288 happening out of the box, without any extra configuration.
2014-01-29 13:33:50 -08:00
John-David Dalton
dadde52c40 More perf.js cleanup and add _.compose benchmarks. [ci skip] 2014-01-29 09:33:46 -08:00
John-David Dalton
369dd98cbe Avoid installing coveralls in travis runs when not needed. 2014-01-29 08:57:14 -08:00
John-David Dalton
8cdd6cd131 Fix test/test.js in lodash-node and carry fixes over to perf/perf.js. 2014-01-29 08:57:14 -08:00
John-David Dalton
973bc21f37 Add note to contributing.md to not worry about regenerating docs or dist files. [ci skip] 2014-01-29 08:56:55 -08:00
John-David Dalton
2ba327345d Fix underscore build modifications to match. 2014-01-29 01:44:09 -08:00
John-David Dalton
138ecc4ee1 Simplify resolving filePath in perf/perf.js. [ci skip] 2014-01-29 00:29:57 -08:00
John-David Dalton
5b9a8e9bf9 Fix tests for lodash-amd. 2014-01-29 00:29:50 -08:00
John-David Dalton
e520486892 Rebuild dist/ and docs. 2014-01-28 23:41:44 -08:00
John-David Dalton
ecb91613e8 Minor whitespace nits in _.compose and _.pull. [ci skip] 2014-01-28 23:38:29 -08:00
John-David Dalton
d4ac76081e Correct _.compose unit test. 2014-01-28 23:38:29 -08:00
John-David Dalton
63727b67ee Cleanup _.compose. 2014-01-28 22:14:10 -08:00
John-David Dalton
d969dcecbf Set LARGE_ARRAY_SIZE to 40. 2014-01-28 22:05:50 -08:00
John-David Dalton
49c9a202e0 Cleanup perf tests and adjust for LARGE_ARRAY_SIZE of 40. 2014-01-28 22:05:50 -08:00
Stephen Solka
512c8de526 Use .apply for initial function call in _.compose then use .call in loop. [closes #463, #464] 2014-01-28 22:05:19 -08:00
John-David Dalton
012a929067 Add _.cloneDeep doc note to _.clone too. [ci skip] 2014-01-27 21:59:26 -08:00
John-David Dalton
bec4e8d8e4 Fix lodash-node unit tests. 2014-01-27 21:50:50 -08:00
John-David Dalton
9f0993f29b Fix setting the selectedIndex of dropdown lists in test-ui.js and perf-ui.js. 2014-01-27 21:49:38 -08:00
John-David Dalton
1b79448ac2 Add _.zipObject test for extra values. 2014-01-27 20:00:47 -08:00
John-David Dalton
6cef7d5060 Ensure _.where handles properties with undefined properties. [closes #461] 2014-01-27 17:53:10 -08:00
John-David Dalton
752545ec0e Minor doc nit for _.runInContext. [ci skip] 2014-01-26 14:44:11 -08:00
John-David Dalton
adbebf7ecc Avoid detecting the global function in Java based environments like Rhino as the freeGlobal. 2014-01-26 13:37:31 -08:00
John-David Dalton
4d57ac0ce1 Avoid detecting the global function in Java based environments like Rhino as the freeGlobal. 2014-01-26 13:27:39 -08:00
John-David Dalton
24b77d9dcb Minor code format nit in test.js. [ci skip] 2014-01-26 13:27:01 -08:00
John-David Dalton
cc0f431c35 Minor comment nit for consistency across projects. [ci ckip] 2014-01-25 22:48:12 -08:00
John-David Dalton
1e7927fbff Consistent use of getConfig in test/index.html and test/underscore.html. 2014-01-25 19:52:49 -08:00
John-David Dalton
129e56e570 Avoid accessing body.completed if body isn't truey in saucelabs.js. 2014-01-25 18:12:00 -08:00
John-David Dalton
5beef690ad Fix loading baseEach for commonjs modularize tests. 2014-01-25 18:11:25 -08:00
John-David Dalton
b0383b0978 Update freeGlobal assignment in lodash builds, benchmark.js, and qunit-extras to work in node-webkit. [closes #419] 2014-01-25 17:02:27 -08:00
John-David Dalton
16c6a11b77 Replace _.createCallback reference in readme with _.callback. [ci skip] 2014-01-25 11:00:30 -08:00
John-David Dalton
9117b13576 Rebuild dist & docs. [ci skip] 2014-01-25 11:00:18 -08:00
John-David Dalton
af55978918 Minor test cleanup. [ci skip] 2014-01-25 10:25:50 -08:00
John-David Dalton
0446a1b3a8 Tweak documented arg name key for _.pluck. [ci skip] 2014-01-25 02:52:14 -08:00
John-David Dalton
3986dd4c32 Add baseEach tests. 2014-01-25 02:48:41 -08:00
John-David Dalton
79afa16a7f Fix test fails in older Safari and cleanup setProperty in test.js. 2014-01-24 23:16:07 -08:00
John-David Dalton
087ed0aa6a Update vendor/qunit-extras and simplify its load/install. 2014-01-24 09:42:45 -08:00
John-David Dalton
44fa3d2d07 Fix typo in throttle test. 2014-01-24 00:52:38 -08:00
John-David Dalton
8654d83a33 Drop 'use strict' in the unit tests and make its IIFE more closely resemble lodash's. 2014-01-23 23:19:13 -08:00
John-David Dalton
efb78c823c Add _.memoize test and normalize on using properties of a and b instead of x and y. 2014-01-23 23:00:49 -08:00
John-David Dalton
3bb7f0c291 Fix regression in test-ui.js. [ci skip] 2014-01-23 09:17:53 -08:00
John-David Dalton
62e0db7c9b Fix Function.prototype.toString mock in test/ to avoid errors in Firefox. 2014-01-23 00:30:59 -08:00
John-David Dalton
130695fcb3 Remove trailing slash in locationPath of test/underscore.html. 2014-01-23 00:30:24 -08:00
John-David Dalton
05fa301ecb Add freeGlobal.self checks to benchmark.js and quinit-extras to support browserified code running in a web worker. 2014-01-22 23:48:29 -08:00
Michael "Z" Goddard
ee90f730b5 Add freeGlobal.self check to support browserified code running in a web worker.
`self` is the global context name in web workers. So
`freeGlobal.self === freeGlobal` is `true` in that environment when
lodash is packaged in a library/site for use in web workers.
2014-01-22 23:38:36 -08:00
John-David Dalton
7b8a23453f Cleanup lodashBizarro code to get coverage up in AMD modules. 2014-01-22 23:09:42 -08:00
John-David Dalton
cb44479420 Add freeGlobal.self check to test/asset/set.js. 2014-01-22 23:07:50 -08:00
John-David Dalton
afb3806326 Cleanup the perf and test ui files. 2014-01-22 23:04:10 -08:00
John-David Dalton
d96bfd21b7 Comment nit in the underscore build. [ci skip] 2014-01-22 11:40:43 -08:00
John-David Dalton
bbc3100bb3 Add _.callback as an alias of _.createCallback. 2014-01-22 08:54:25 -08:00
John-David Dalton
ac1bb2a6bd Rebuild docs and updated tested Chrome version in readme. [ci skip] 2014-01-22 00:27:50 -08:00
John-David Dalton
41ef391d15 Avoid leaking a data var in compat/legacy builds and remove dead code from the underscore build. 2014-01-22 00:26:45 -08:00
John-David Dalton
e51aa5899a Dumb _.curry down for consistent feature support for old environments. 2014-01-21 22:25:08 -08:00
John-David Dalton
38bb975abd Allow legacy build tests to pass. 2014-01-21 20:49:44 -08:00
John-David Dalton
a249b315ca Make breakIndicator use expando in underscore builds. 2014-01-21 19:59:59 -08:00
John-David Dalton
eba85e1ec3 Update vendor/qunit-extras. [ci skip] 2014-01-21 19:59:31 -08:00
John-David Dalton
c1c92256ea Track arity of functions created by _.bind, _.bindKey, _.bindAll, _.partial, _.partialRight, _.curry, and _.wrap. 2014-01-21 19:59:13 -08:00
John-David Dalton
58ce97c0b4 Ensure _.flatten works with _.map in underscore builds. 2014-01-20 11:33:31 -08:00
John-David Dalton
ca58bab1f0 Cleanup assign/defaults/merge unit test. [ci skip] 2014-01-20 09:31:55 -08:00
John-David Dalton
052c484abd Update .travis.yml dep versions and make coveralls reporting optional so we don't fail when their service is down. 2014-01-20 08:46:53 -08:00
John-David Dalton
7a213c9d6f Fix test typo in test/index.html. 2014-01-20 00:39:40 -08:00
John-David Dalton
f4de7422b3 Fix large array optimization in baseDifference. 2014-01-20 00:39:20 -08:00
John-David Dalton
a3d18d0429 Add coverage for Set for environments w/o native support. 2014-01-19 23:52:27 -08:00
John-David Dalton
77fbffdc4b Use baseEach in underscore build of _.sortBy. 2014-01-19 13:41:15 -08:00
John-David Dalton
63ea01104b Conditionally define createCache base on feature inference. 2014-01-19 13:27:23 -08:00
John-David Dalton
cad0f1f396 Ensure we use an underscore build of _.result. 2014-01-19 12:28:25 -08:00
John-David Dalton
677fb93494 Use baseEach, baseForOwn and baseForIn to reduce dependencies on baseCreateCallback. 2014-01-19 12:10:09 -08:00
John-David Dalton
55cbb12701 Use ES6 Set to optimize for large arrays in _.uniq, _.difference, & _.intersection. 2014-01-18 22:51:43 -08:00
John-David Dalton
14099813f0 Fix typo in travis.yml. 2014-01-17 20:11:25 -08:00
John-David Dalton
b1fd4e853c Rebuild dist files. 2014-01-17 09:27:27 -08:00
John-David Dalton
c1d3fc1b78 Cleanup _.result default value patch. [closes #455] 2014-01-17 09:27:11 -08:00
John-David Dalton
829980a941 Ensure sauce tests run against builds created by travis-ci. 2014-01-16 23:45:06 -08:00
John-David Dalton
d1e1a90d08 Merge pull request #454 from pistacchio/master
Added default value to `_.result`.
2014-01-16 21:16:12 -08:00
John-David Dalton
d56de091f6 Missed a BIND_FLAG use in baseCreateCallback. 2014-01-16 20:18:21 -08:00
John-David Dalton
87bb926fef Make the coverage run in .travis.yml use the generated modern build. 2014-01-16 19:54:33 -08:00
pistacchio
e983f93859 Added default value to _.result 2014-01-16 18:54:20 +01:00
John-David Dalton
c721acc2fa Make each build in travis.yml so users don't have to include them in pull requests for tests to pass. 2014-01-16 08:37:57 -08:00
John-David Dalton
16fd4c83ac Indicate slow path in lodash wrapper perf test. [ci skip] [closes #452] 2014-01-16 07:34:04 -08:00
John-David Dalton
999dfb84ee Use vars to store bitmask flags to improve readability. 2014-01-15 23:52:56 -08:00
John-David Dalton
c6557e5078 Add more _.indexOf tests. 2014-01-14 22:11:10 -08:00
Johann Steinbrecher
f7aab02978 Fixing indexOf([], undefined, true) to return -1 insead 0 2014-01-14 12:55:06 -08:00
John-David Dalton
fdcd67dd6b Make stable multi prop sort unit test more complex. 2014-01-13 19:39:02 -08:00
John-David Dalton
6c611d71dd Qualify coverage claim in readme. [ci skip] 2014-01-13 09:02:49 -08:00
John-David Dalton
b7e2396269 Increase test coverage of trim methods and _.sortBy. 2014-01-13 08:59:41 -08:00
John-David Dalton
ab62875ab1 Use a more preferred command to enable npm on Node 0.6 in travis.yml. 2014-01-12 22:02:11 -08:00
John-David Dalton
a499fdbb13 Reduce objectTypes and indexTypes deps. 2014-01-12 13:31:37 -08:00
John-David Dalton
bf2f0c38ed Update _.template docs to mark data as optional. [ci skip] 2014-01-11 23:57:17 -08:00
John-David Dalton
b14c05ccae Fix the underscore build of _.memoize. 2014-01-11 23:54:55 -08:00
John-David Dalton
66e7cd41b7 Rebuild dist/lodash.underscore.js with breakIndicator and reverted _.invert. 2014-01-11 21:53:12 -08:00
John-David Dalton
e9a15d9189 Remove keyPrefix for using a simple _ prefix. 2014-01-11 21:50:36 -08:00
John-David Dalton
e4aee13e9e Merge branch 'master' of github.com:lodash/lodash 2014-01-10 22:22:45 -08:00
John-David Dalton
551f9fcdf9 Make checks for _.map and _.reduce use consistent with indexTypes. 2014-01-09 23:27:32 -08:00
John-David Dalton
2ec5e948b4 Make _.isEqual work with plain objects containing constructor properties with like object values and make _.invert assign arrays when using the multiValue flag. [closes #420] 2014-01-09 20:13:37 -08:00
John-David Dalton
60b7f504e6 Make the guard checks in _.assign and _.defaults more thorough. 2014-01-09 08:43:52 -08:00
John-David Dalton
f99668f551 Add doc note to _.bind, _.bindAll, _.partial, _.partialRight, and _.curry about not setting the resulting functions .length. [closes #444] 2014-01-09 08:41:21 -08:00
John-David Dalton
8ade41b270 Update vendors. 2014-01-09 08:10:51 -08:00
John-David Dalton
a36a5363b4 Avoid using a unique key for keyPrefix as it causes issues when lodash is modularized into individual npm packages. [closes #446] 2014-01-09 01:31:28 -08:00
John-David Dalton
cb22fb54e8 Allow _.trim, _.trimLeft, and _.trimRight to remove specified chars. 2014-01-08 23:39:52 -08:00
John-David Dalton
1dcfdfdb65 Remove test until v3.0 when we'll enforce uniform skipping of the constructor property of prototype objects. 2014-01-07 08:30:55 -08:00
John-David Dalton
d309eb8fa1 Expose _.slice. 2014-01-06 22:26:50 -08:00
John-David Dalton
16dfdbe314 Ensure shimIsPlainObject returns true for plain objects with a constructor property that has a function value. 2014-01-05 13:49:18 -06:00
John-David Dalton
b926ed7b00 Rebuild diet and docs. 2014-01-04 23:10:22 -06:00
John-David Dalton
67a6b88104 Add tests for _.capitalize. 2014-01-04 21:51:23 -06:00
John-David Dalton
631699bf80 Doc cleanup. [ci skip] 2014-01-04 21:32:01 -06:00
John-David Dalton
80801bf7d0 Add _.capitalize. 2014-01-04 20:16:19 -06:00
John-David Dalton
4850a033fa Avoid ternary operations that aren't part of an assignment. 2014-01-03 11:50:29 -06:00
John-David Dalton
0b4029f7a1 Fix lodashBizarro tests for trim, trimLeft, and trimRight. 2014-01-03 11:05:09 -06:00
John-David Dalton
c07ef0d92a Add doc note for options.init to createIterator. [ci skip] 2014-01-03 00:55:59 -06:00
John-David Dalton
ca48c5ddff Expose trim, trimLeft, and trimRight. 2014-01-03 00:37:49 -06:00
John-David Dalton
a20c362983 Rearrange source to better match the doc order. 2014-01-02 19:06:40 -06:00
John-David Dalton
7beb204b9d Remove forEach dep from mixin. 2014-01-01 23:10:27 -06:00
John-David Dalton
3e4f9451a0 Update year to 2014. [ci skip] 2014-01-01 12:08:02 -06:00
John-David Dalton
6e5846d206 Replace isWhitespaceAt with trimmedLeftIndex and trimmedRightIndex. 2014-01-01 10:57:42 -06:00
John-David Dalton
5965591934 Optimize trim. 2013-12-31 20:23:25 -06:00
John-David Dalton
78f8a03da5 Ensure the trim fallback is tested and counted for code coverage. 2013-12-31 02:01:19 -06:00
John-David Dalton
4d10584233 Beef up _.parseInt support and add trim internally. 2013-12-30 23:58:56 -06:00
John-David Dalton
106fa64060 Cleanup arrayReg and splice references. 2013-12-29 15:49:26 -06:00
John-David Dalton
95be8b2cf3 Optimize _.sortBy by adding baseCompareAscending and compareMultipleAscending. 2013-12-28 21:39:33 -06:00
John-David Dalton
53d7c6c085 Fix node 0.6 tests with npm registry's new cert. 2013-12-27 11:21:20 -06:00
John-David Dalton
e4df75519c Ensure _.random() returns 1 or 0. 2013-12-26 10:09:53 -06:00
John-David Dalton
0438fa6816 Ensure _.reduce doesn't assign accumulator a collection value if its length is 0. 2013-12-25 02:36:02 -06:00
John-David Dalton
2dab4ccf85 Fix _.reduce for modern and underscore builds. 2013-12-24 12:47:22 -06:00
John-David Dalton
b338e76649 Cleanup lodash and lodash.underscore builds. 2013-12-23 17:45:05 -06:00
John-David Dalton
c737ab764e Minor doc tweaks to _.pluck and _.match. [ci skip] 2013-12-23 11:06:54 -06:00
John-David Dalton
990e73fce6 Add _.match. 2013-12-22 23:56:28 -06:00
John-David Dalton
99fac3ae1c Go back to a version range in travis.yml now that sauce-tunnel has fixed its npm issues. 2013-12-22 23:00:54 -06:00
John-David Dalton
ad0bcc7de9 Add another _.constant test for falsey values. 2013-12-22 01:25:24 -06:00
John-David Dalton
8069853dda Fix reEscapedHtml for underscore builds. 2013-12-21 10:39:02 -06:00
John-David Dalton
14ed669eba Use a fixed version, 1.1.0, until sauce-tunnel fixes their corrupt 1.1.1 npm package. 2013-12-21 10:05:07 -06:00
John-David Dalton
9ff5fa4acf Remove trailing newlines in .html files and add .php to .editorconfig. [ci skip] 2013-12-21 10:03:40 -06:00
John-David Dalton
d026024e8c Merge branch 'master' of github.com:lodash/lodash 2013-12-21 09:45:58 -06:00
John-David Dalton
25d1491e6b Merge pull request #435 from d10/master
Add .editorconfig. [ci skip]
2013-12-21 07:41:32 -08:00
Benjamin Tan
4e1415faf2 Add .editorconfig 2013-12-21 21:15:12 +08:00
John-David Dalton
692f64a78a Reduce _.escape and _.unescape dependencies 2013-12-21 03:45:56 -06:00
John-David Dalton
b20b8af5a6 Simplify nvm use in travis.yml. 2013-12-20 03:15:19 -08:00
John-David Dalton
d34cf636d8 Use Boolean to fake out the isNative check and allow environments to test the native String#contains fork of _.contains 2013-12-20 02:38:18 -08:00
John-David Dalton
3c72ea40b4 Use node --harmony for code coverage tests. 2013-12-20 01:22:15 -08:00
John-David Dalton
f87c7833a3 Update the tested version of node in readme. [ci skip] 2013-12-19 23:04:18 -08:00
John-David Dalton
f3931140fe Add bad shim tests for String#contains and remove those for Function#bind as we don't use native bind. 2013-12-19 02:20:54 -08:00
John-David Dalton
8459117c23 Minor tweaking, moving var order. 2013-12-19 00:57:58 -08:00
John-David Dalton
bbc0c97329 Update docdown to fix doc bugs related to params that are properties of other params. [ci skip] 2013-12-19 00:00:00 -08:00
John-David Dalton
1d8b152758 Merge pull request #432 from d10/master
Fix _.template docs typo. [ci skip]
2013-12-18 23:09:01 -08:00
John-David Dalton
1c4652448c Optimize _.contains by using native String#contains when available. 2013-12-18 23:05:16 -08:00
Benjamin Tan
3a34e606b8 Fix _.template docs typo [ci skip] 2013-12-19 12:02:04 +08:00
John-David Dalton
ca55748103 Ensure AMD tests it all of the debounce coverage. 2013-12-16 23:49:13 -08:00
John-David Dalton
43fa199cfa Remove opera 9 from sauce too. 2013-12-16 22:26:31 -08:00
John-David Dalton
f288ca23ae Correct typo in iteratorTemplate code comment. [ci skip] 2013-12-16 22:10:36 -08:00
John-David Dalton
4026714461 Relax reNative as it's limited in scope. 2013-12-16 21:53:01 -08:00
John-David Dalton
39a8652708 Simplify the _.support.dom check. 2013-12-16 21:22:46 -08:00
John-David Dalton
fb432465ea Disable testing Opera 10 in sauce until they fix it. 2013-12-16 20:17:15 -08:00
John-David Dalton
42bccfe1ec Improve regexp for reNative. 2013-12-16 20:15:37 -08:00
John-David Dalton
98566150d2 Avoid chance fails by noConflict race conditions. 2013-12-16 08:47:16 -08:00
John-David Dalton
676e1705c1 Rebuild docs and dist. 2013-12-16 02:34:46 -08:00
John-David Dalton
172cc1ffea Add thisArg to _.tap. 2013-12-16 02:34:20 -08:00
John-David Dalton
6845a52e92 Avoid sparatic fails with Firefox 26 and amd tests. 2013-12-16 01:44:51 -08:00
John-David Dalton
b5dc89f0e6 Add opera 9 and 10 to sauce tests. 2013-12-16 00:28:06 -08:00
John-David Dalton
ecaea51fe0 Update Firefox version in sauce and try Opera again. 2013-12-15 23:56:12 -08:00
John-David Dalton
77baf08092 Update tested browsers in the readme. [ci skip] 2013-12-15 23:55:43 -08:00
John-David Dalton
63ff5a2fe3 Update node version to 0.10 for sauce in travis.yml since they've upgraded their node 0.10 version. 2013-12-15 23:53:46 -08:00
John-David Dalton
97662f4b3e Fix comment typo in test/index.html. [ci skip] 2013-12-15 23:34:28 -08:00
John-David Dalton
38869d5035 Add tests for _.support.funcDecomp and WinRTError. 2013-12-15 23:17:33 -08:00
John-David Dalton
08047d4ab7 Cleanup iteratorTemplate code comments. [ci skip] 2013-12-15 23:15:19 -08:00
John-David Dalton
cf33853e68 Add result of array tests. 2013-12-15 22:50:43 -08:00
John-David Dalton
768e618ed9 Fix doc typos for _.mapValues and _.sample. 2013-12-15 22:50:10 -08:00
John-David Dalton
025ed51f11 Reduce the chance of a slow script warning in some browsers in test.js. 2013-12-15 21:24:13 -08:00
John-David Dalton
ab9dae3bf3 Fix IE compat mode bug with clearTimeout and setTimeout in test/index.html. 2013-12-15 20:28:03 -08:00
John-David Dalton
74da5dfd4b Keep code coverage up for _.isElement. 2013-12-15 19:15:01 -08:00
John-David Dalton
aaaf452fdc Move "escape" and "evaluate" delimiters to their own regexes. Cleanup the _ docs and iteratorTemplate. 2013-12-15 15:47:09 -08:00
John-David Dalton
d2b97d8aea Cleanup and rebuild docs and diet. 2013-12-14 03:05:30 -08:00
John-David Dalton
8b95216493 Merge pull request #429 from d10/master
Improve links formatting for docs. [ci skip]
2013-12-14 03:01:29 -08:00
Benjamin Tan
f933fa8c78 Improve links formatting for docs 2013-12-14 18:49:01 +08:00
John-David Dalton
f955309139 Switch from chrome to googlechrome browser name in saucelabs.js. 2013-12-14 02:34:05 -08:00
John-David Dalton
9c65a82430 Avoid issues with variable window. 2013-12-14 02:19:42 -08:00
John-David Dalton
7b4dda9c73 Fix readme typo in build differences wiki link. [ci skip] [closes #428] 2013-12-14 01:59:31 -08:00
John-David Dalton
9ad7d2d977 Fix bizarro setTimeout and clearTimeout for requirejs test runs. 2013-12-14 01:53:21 -08:00
John-David Dalton
e3b4b2f667 Simplify iteratorTemplate. 2013-12-14 01:29:17 -08:00
John-David Dalton
60a1374fb4 No longer compile _.assign, _.defaults, or _.forOwn. 2013-12-13 09:11:58 -08:00
John-David Dalton
7fcbc3c003 Fix failing test in node. 2013-12-13 08:34:16 -08:00
John-David Dalton
40421f4321 Make _.isElement more robust. [closes #427] 2013-12-12 22:22:47 -08:00
John-David Dalton
ad2683b610 Add more semicolons to the docs. \ht @mathias [ci skip] 2013-12-11 19:51:07 -08:00
John-David Dalton
7d49699e5f Merge branch 'master' of github.com:lodash/lodash 2013-12-11 09:24:58 -08:00
John-David Dalton
b34a239096 Add more to the "features" section of the readme and use the github url for lodash-amd references. [ci skip] 2013-12-11 09:24:47 -08:00
John-David Dalton
02d1251fe4 Merge pull request #426 from lodash/docs
Tweak documentation for `{un,}escape`. [ci skip]
2013-12-11 09:00:51 -08:00
Mathias Bynens
95e58ebb9f Tweak documentation for {un,}escape [ci skip] 2013-12-11 17:54:08 +01:00
John-David Dalton
1cb2704f1b Add files to bower and volo ignore lists. [ci skip] 2013-12-08 18:15:56 -08:00
John-David Dalton
dea71f1aa9 Update dojo to 1.9.2. 2013-12-08 17:56:11 -08:00
John-David Dalton
aee975b7d8 Add .log files to volo's ignore list. [ci skip] 2013-12-08 17:54:24 -08:00
John-David Dalton
18b6d51644 Reduce the amount of phantomjs runs in travis.yml and tweak for 100% coverage in amd tests. 2013-12-08 14:29:03 -08:00
John-David Dalton
3a5ff851af Avoid swallowing errors in the test setup in .travis.yml. 2013-12-08 12:12:05 -08:00
John-David Dalton
cd929345e6 Ignore all log files in .gitignore. [ci skip] 2013-12-08 11:01:35 -08:00
John-David Dalton
de232dd726 Allow amd builds to test for bizarro methods. 2013-12-08 10:44:07 -08:00
John-David Dalton
8ebe99d4f5 Add support for writing the coverage.json file for phantomjs runs in test/test.js. [ci skip] 2013-12-07 23:46:39 -08:00
John-David Dalton
32f760a461 Add semantic versioning note to readme. [ci skip] 2013-12-07 23:28:02 -08:00
John-David Dalton
65eaab5cf4 Update .gitignore to ignore npm-debug.log and coverage folders. [ci skip] 2013-12-07 23:05:39 -08:00
John-David Dalton
51698944e0 Cleanup _.xor patch and add a unit test. 2013-12-06 20:34:59 -08:00
Ryan Van Etten
64fc924357 Ensure _.xor() returns new unique array. 2013-12-06 19:38:43 -08:00
John-David Dalton
c61a0cdd22 Cleanup _.compact optimization. 2013-12-06 19:34:30 -08:00
robertmesserle
9a1de81fc5 Optimized compact method by using a counter in place of Array.prototype.push() 2013-12-06 19:34:30 -08:00
John-David Dalton
3633d3cd73 Optimize _.unescape. 2013-12-06 09:13:38 -08:00
John-David Dalton
9a0465eb05 Reduce sauce timeouts. 2013-12-05 21:25:03 -08:00
John-David Dalton
088e199aa2 Cleanup docs. [ci skip] 2013-12-05 21:24:47 -08:00
John-David Dalton
bc4c043d7e Cleanup previous commit, add a _.invert unit test, and rebuild docs. 2013-12-05 09:38:42 -08:00
John-David Dalton
764299ea8a Merge pull request #420 from dr-skot/master
Add oneToMany support in _.invert.
2013-12-05 08:35:14 -08:00
Scott Shepherd
2abc87a1f2 regenerated README.md after adding oneToMany support to _.invert 2013-12-05 11:28:06 -05:00
Scott Shepherd
75fa116c88 built dist files after adding oneToMany support to _.invert 2013-12-05 11:24:46 -05:00
Scott Shepherd
cc7575adab added oneToMany option to _.invert() 2013-12-05 09:14:58 -05:00
Scott Shepherd
efb1a2c8e0 added oneToMany option to _.invert() 2013-12-05 09:12:38 -05:00
John-David Dalton
c2972fcaa0 Avoid adding Function.prototype additions to _. 2013-12-04 22:50:51 -08:00
John-David Dalton
250fd71e16 Tweak readme layout of downloads and add not about 100% code coverage. [ci skip] 2013-12-03 22:38:02 -08:00
John-David Dalton
783c165201 Add doc note to _.zip about unzipping values. [ci skip] [closes #418] 2013-12-03 20:40:15 -08:00
John-David Dalton
326a3c5932 Fix typo in test description and reduce sauce test timeouts. 2013-12-03 20:37:26 -08:00
John-David Dalton
0af1a85442 Bump to v2.4.1. 2013-12-02 23:21:16 -08:00
John-David Dalton
10e7bb97ee Add comments to baseBind use of arguments. [ci skip] [closes #416] 2013-12-02 23:11:19 -08:00
John-David Dalton
c319bbc5f3 Ensure _.isEqual performs comparisons between objects with shared property values correctly. [closes #415] 2013-12-02 21:15:00 -08:00
John-David Dalton
9e42f70e5f Add more lodashBadShim tests. 2013-12-02 01:40:20 -08:00
John-David Dalton
ff47152187 Add max-duration option to sauce config. 2013-12-01 21:40:48 -08:00
John-David Dalton
94b6ce5ca0 Excuse some underscore _.debounce and _.throttle tests in sauce. 2013-12-01 21:40:48 -08:00
John-David Dalton
8e1020f134 Tweak _.now unit test. 2013-12-01 21:40:48 -08:00
John-David Dalton
be7a0fef41 Increase sauce idle-timeout from the default of 90 to 300. 2013-12-01 21:40:48 -08:00
Bitdeli Chef
9fe7bb7362 Add a Bitdeli badge to README 2013-12-01 17:55:22 +00:00
John-David Dalton
5d4b121ac1 Remove extra props added for lodashBadShim. 2013-12-01 11:29:41 -06:00
John-David Dalton
cb424a5f78 Better error messages for sauce issues. [ci skip] 2013-11-30 23:11:16 -06:00
John-David Dalton
88ab9d0756 Fix phantomjs browser tests. 2013-11-30 19:57:42 -06:00
John-David Dalton
29f4fd40ed Try a different secure string in travis.yml. 2013-11-30 17:10:53 -06:00
John-David Dalton
b7f7ba06b9 Merge qunit clib and extras. 2013-11-30 16:02:18 -06:00
John-David Dalton
94f8ac8d1d Get test coverage to 100%. 2013-11-30 11:51:11 -06:00
John-David Dalton
72ab38bd2f Remove fork in baseUniq that is never reached and increase test coverage. 2013-11-30 00:29:50 -06:00
John-David Dalton
b3d5466131 Fix tests for commonjs module builds. [ci skip] 2013-11-29 22:11:30 -06:00
John-David Dalton
bafbd8f1b6 Add COVERALLS_REPO_TOKEN to travis.yml. 2013-11-29 21:57:21 -06:00
John-David Dalton
8c1ce03183 Ignore .coveralls.yml. 2013-11-29 21:01:12 -06:00
John-David Dalton
97490b272f Add more unit tests to increase coverage. 2013-11-29 20:54:18 -06:00
John-David Dalton
2afbe9514b Rebuild files and docs. 2013-11-29 20:37:56 -06:00
John-David Dalton
603be609a1 Add sudo to the istanbul command in travis.yml. 2013-11-29 18:48:01 -06:00
John-David Dalton
4590be7b65 Add isNative. 2013-11-29 18:47:25 -06:00
John-David Dalton
097a2f6582 Optimize _.partial and _.partialRight. 2013-11-29 11:21:48 -06:00
John-David Dalton
f818e5bc51 Whitespace nit in test.js. [ci skip] 2013-11-29 08:40:13 -06:00
John-David Dalton
34cf8fc43c Ensure _.partialRight args are applied to __bindData__ in the correct order. [closes #408] 2013-11-29 07:09:21 -06:00
John-David Dalton
7712765c3a Ensure __bindData__ is properly cloned. [closes #408] 2013-11-29 06:31:37 -06:00
John-David Dalton
eaf1304eda Rebuild with xor doc typo fixed and docs with lodash.com link. [ci skip] 2013-11-27 23:46:27 -06:00
John-David Dalton
f97f32df0f Merge pull request #406 from Delapouite/doc
Add home link in docs. [ci skip]
2013-11-27 03:45:22 -06:00
John-David Dalton
79eecd6db4 Remove extraneous test. [ci skip] 2013-11-27 03:42:59 -06:00
Delapouite
5a75d8e788 Add home link in docs. [ci skip] 2013-11-27 10:12:17 +01:00
John-David Dalton
42e58fb73a Add unit test for _.sortBy to ensure arrays returned from callbacks are coerced. 2013-11-26 15:10:55 -06:00
John-David Dalton
dba996b2c4 Fix doc typos. [ci skip] 2013-11-26 15:10:45 -06:00
John-David Dalton
647f0dd34b Bump to v2.4.0. 2013-11-25 23:14:32 -06:00
John-David Dalton
a691a519e8 Add options object to _.mixin. [closes #404] 2013-11-25 13:26:08 -06:00
John-David Dalton
86075973b5 Remove setImmediate use from _.defer. 2013-11-24 15:31:34 -06:00
John-David Dalton
97ea15300c Added unit tests for clearing the timer id of _.delay and _.defer and tests for array chaining methods. 2013-11-24 15:11:45 -06:00
John-David Dalton
a150a8fd52 Update sauce labs excused list in test/underscore.html. [ci skip] 2013-11-24 11:25:12 -06:00
John-David Dalton
ad4e20da52 Fix async test in node when testing modules. [ci skip] 2013-11-24 00:30:13 -06:00
John-David Dalton
e43ab1e46f Add missing semicolon in _#chain doc. [ci skip] 2013-11-22 22:18:53 -08:00
John-David Dalton
e32e280cf1 Update async _.throttle test. 2013-11-22 22:08:51 -08:00
John-David Dalton
c1a07e0943 Cleanup _.xor. 2013-11-22 18:43:51 -08:00
John-David Dalton
93fe641dbf Change sauce detect in test/underscore.html. [ci skip] 2013-11-22 12:42:39 -08:00
John-David Dalton
d8194c0886 Allow _.sortBy to accept an array for callback. 2013-11-22 09:35:39 -08:00
John-David Dalton
75ce4766d3 Fix _.mixin doc typo. [ci skip] 2013-11-21 22:04:59 -08:00
John-David Dalton
7eff3bf854 Add opera to sauce labs and shorten ie-compat tag. 2013-11-21 22:04:38 -08:00
John-David Dalton
af143ae7dc Update alias output in doc TOC. [ci skip] 2013-11-21 10:53:56 -08:00
John-David Dalton
a0e9140dde Use non-minified file for istanbul coverage checks. 2013-11-21 10:52:59 -08:00
John-David Dalton
33e5d46c87 Add _.constant, _.mapValues, and _.xor. 2013-11-21 09:31:55 -08:00
John-David Dalton
f74b206864 Move asyncRetries config to test/test.js. 2013-11-20 19:13:06 -08:00
John-David Dalton
f334ebe577 Revert istanbul change in travis.yml. 2013-11-20 19:11:46 -08:00
John-David Dalton
9c39394d7f Load QUnit extras for cli tests too. 2013-11-20 09:15:39 -08:00
John-David Dalton
8ea0e6977a Move _.createCallback and _.property to the "Utilities" category. 2013-11-20 08:44:53 -08:00
John-David Dalton
bf006473c0 Add _.debounce and _.throttle test for the this binding of func. 2013-11-19 23:33:43 -08:00
John-David Dalton
568af27be4 Change istanbul test file in travis.yml. 2013-11-19 22:34:18 -08:00
John-David Dalton
bd55f86203 Indicate aliases with -> in docs. 2013-11-19 21:26:06 -08:00
John-David Dalton
d95e577639 Expose lodash in the amd fork of the UMD in case it's being loaded with a shim config. [closes #400] 2013-11-19 09:24:12 -08:00
John-David Dalton
a904e54122 Fix _.throttle and _.now tests. 2013-11-19 00:06:20 -08:00
John-David Dalton
2a97655a8d Expose _.now. 2013-11-18 22:34:04 -08:00
John-David Dalton
d878718510 Update sauce platforms with newer chrome versions and more safari versions. 2013-11-18 08:41:41 -08:00
John-David Dalton
416227a2a2 Add build data to sauce. 2013-11-17 22:57:23 -08:00
John-David Dalton
7d1baa8798 Update vendor/benchmark.js. [ci skip] 2013-11-17 18:58:08 -08:00
John-David Dalton
fe2ee64ec9 Expose _.property. 2013-11-16 20:31:18 -08:00
John-David Dalton
96819628d6 Minor doc nit in saucelabs.js. [ci skip] 2013-11-16 12:09:22 -08:00
John-David Dalton
1b30d7909c Minor nit on require path in saucelabs.js. 2013-11-16 09:18:50 -08:00
John-David Dalton
baf253d44e Reduce timer waits because we've fixed the issue with asyncRetries. 2013-11-16 09:18:08 -08:00
John-David Dalton
b7a4d50007 Add coveralls to travis.yml. 2013-11-16 01:14:14 -08:00
John-David Dalton
625b4befb5 Rebuild docs and add links to sauce labs and travis-ci to readme. [ci skip] 2013-11-16 01:14:14 -08:00
John-David Dalton
30678f51bd Fix var _ assignment in index.html. 2013-11-16 01:14:14 -08:00
John-David Dalton
7a4103dd48 Make use of the wait throbber in quint and cleanup the throbber in saucelabs.js. 2013-11-15 22:18:03 -08:00
John-David Dalton
bca3ff2eac Avoid loading lodash when not needed in unit tests. 2013-11-15 22:09:30 -08:00
John-David Dalton
28e2934a89 Allow _.zipObject to accept an array of keys without assuming its an array of key/value pairs. [closes #397] 2013-11-15 00:18:29 -08:00
John-David Dalton
0563af682d Update docdown to avoid escaping characters in code snippets. [ci skip] 2013-11-14 22:40:48 -08:00
John-David Dalton
5ccd63250b Move qunit extras to qunit-extras.js. 2013-11-14 21:02:46 -08:00
John-David Dalton
f262a0745d Avoid require('vm') if testing AMD. 2013-11-14 11:37:15 -08:00
John-David Dalton
c42b63b008 Move compat mode testing to an argument instead of a query param. 2013-11-14 08:47:34 -08:00
John-David Dalton
e7ffb80877 Enable other realm tests for Node too. 2013-11-14 08:30:34 -08:00
John-David Dalton
919166212f Fix istanbul report in travis.yml and tweak async tests. 2013-11-14 01:03:20 -08:00
John-David Dalton
deb124f645 Update ES6 spec link in lodash source too. [ci skip] 2013-11-13 23:28:14 -08:00
John-David Dalton
86b1ff5125 Merge pull request #396 from Delapouite/doc
Update README link to literals string spec. [ci skip]
2013-11-13 09:46:53 -08:00
John-David Dalton
2c8c96149f Fix how sauce runner and tags are parsed. 2013-11-13 08:13:18 -08:00
Delapouite
82e4cc9951 Update README link to literals string spec [ci skip] 2013-11-13 17:06:58 +01:00
John-David Dalton
04df06404f Bump tested Chrome version in readme. [ci skip] 2013-11-13 01:11:50 -08:00
John-David Dalton
f6fcf5fce4 Attempt to make sauce tests public with names, tags, and customized options. 2013-11-13 00:24:08 -08:00
John-David Dalton
ac5e92c879 Update doc whitespace and _.template doc example. [ci skip] 2013-11-13 00:20:17 -08:00
John-David Dalton
37ccc80ba4 Fix _.size doc typo. [ci skip] [closes #394] 2013-11-12 08:59:40 -08:00
John-David Dalton
8153f97899 Update docdown to correctly detect _.noop as a function. [ci skip] 2013-11-12 00:21:45 -08:00
John-David Dalton
8dedc6d3dc Make use of _.noop more in test/test.js. 2013-11-12 00:20:42 -08:00
John-David Dalton
807d75e13a Remove exposing root._ in the AMD fork of the UMD because Lo-Dash is defined as an anonymous module and the issue it solves isn't applicable to it. 2013-11-11 22:07:56 -08:00
John-David Dalton
feac1786e1 Move min tested Node.js version up to match travis-ci to avoid local testing on top of travis-ci. [ci skip] 2013-11-11 19:37:09 -08:00
John-David Dalton
09e0f4e36c Move ui.isModularize lower in test-ui.js, tweak timing tests, and update lodash-es6 link in readme. 2013-11-11 09:27:49 -08:00
John-David Dalton
9999332107 Bump to v2.3.0. 2013-11-10 20:54:17 -08:00
John-David Dalton
d4ec7e5357 Adjust _.throttle timing in test/test.js. 2013-11-10 19:54:37 -08:00
John-David Dalton
064b3caf08 Fix test in newer opera. 2013-11-10 19:32:53 -08:00
John-David Dalton
c83d2e9513 Fix failing tests in old Opera. 2013-11-10 18:10:34 -08:00
John-David Dalton
48ff516215 Move support note to lodash-cli. [ci skip] 2013-11-10 15:33:43 -08:00
John-David Dalton
cdccbb59ab Avoid the use of _.times in timed tests. 2013-11-10 13:52:24 -08:00
John-David Dalton
2fe5a863ac Avoid _.noop use in test/underscore.html and test/backbone.html. 2013-11-10 13:22:47 -08:00
John-David Dalton
7d1fccf474 Ensure _.noop isn't exposed for underscore builds. 2013-11-10 12:03:13 -08:00
John-David Dalton
0a8dbc8831 Minor readme style tweaks. [ci skip] 2013-11-10 11:11:00 -08:00
John-David Dalton
177a3c2cbd Simplify baseCreateWrapper. 2013-11-09 08:38:04 -08:00
John-David Dalton
9f22e634f5 Simplify a _.debounce and a_.throttle test. 2013-11-09 01:06:44 -08:00
John-David Dalton
55a8c7b540 Correct underscore builds & temporarily disable opera testing in sauce until they resolve their issues. 2013-11-08 09:23:40 -08:00
John-David Dalton
76c11fe65a Try opera in saucelabs.js. 2013-11-07 22:24:26 -08:00
John-David Dalton
b15ed00feb Reduce wait times to speed up unit tests. 2013-11-07 20:51:48 -08:00
John-David Dalton
fc3ff34c2d Fix builds. 2013-11-07 20:48:11 -08:00
John-David Dalton
5faa0f55bc Add baseDifference to optimize _.omit & _.without. 2013-11-07 20:43:23 -08:00
John-David Dalton
77f0731c3e Push back timer in _.delay tests. 2013-11-07 20:42:48 -08:00
John-David Dalton
ffff623852 Tweak var names in _.clone and baseFlatten. [ci skip] 2013-11-07 19:27:19 -08:00
John-David Dalton
a6bc40b506 Fix typo in _.contains docs. [ci skip] [closes #393] 2013-11-07 19:04:56 -08:00
John-David Dalton
a034515019 Add DevDocs to the readme. [ci skip] 2013-11-07 09:52:20 -08:00
John-David Dalton
49c8f23bf7 Adjust timing test to avoid false fails in sauce. 2013-11-07 09:19:25 -08:00
John-David Dalton
29b7a71812 Ensure there is a response object before accessing its statusCode. 2013-11-07 09:05:44 -08:00
John-David Dalton
8de3283dd1 Add special thanks to Sauce Labs to readme. [ci skip] 2013-11-06 23:15:07 -08:00
John-David Dalton
4bbe5b3358 Fix minified builds. 2013-11-06 22:10:55 -08:00
John-David Dalton
3dd3af4a73 Optimize _.omit for large arrays by leveraging _.difference which has optimizations for large arrays. 2013-11-06 21:09:58 -08:00
John-David Dalton
7e7b129822 Move the QUnit.config.hidepassed setting up. 2013-11-06 20:05:28 -08:00
John-David Dalton
8bcc1d81d2 Set loader to none by default in test.html and add default values to perf.html too. 2013-11-06 09:27:19 -08:00
John-David Dalton
aa8e92e9a5 Update qunit-clib to avoid issues with non-writable context.clearTimeout. 2013-11-06 08:51:16 -08:00
John-David Dalton
a8196ec99e Update builds & docs. 2013-11-05 23:54:03 -08:00
John-David Dalton
bd3034819e Ensure recursive _.throttle calls still work. 2013-11-05 23:48:07 -08:00
John-David Dalton
7bb86c4e2a Fix typos and rebuild docs & builds. 2013-11-05 21:53:28 -08:00
John-David Dalton
94ed21d1cf Add count check now that we clear timeoutId properly. 2013-11-05 21:44:59 -08:00
John-David Dalton
1bb7c31ee4 Clear timeoutId if func is called in _.debounce. 2013-11-05 21:41:13 -08:00
John-David Dalton
06d12b376c Tweak pull_request detection in saucelabs.js. 2013-11-05 21:17:42 -08:00
John-David Dalton
e9c8137fd8 Add a mix of arguments to _.throttle tests. 2013-11-05 21:14:47 -08:00
John-David Dalton
eaaddf40d2 Fix failing _.debounce test. 2013-11-05 21:14:29 -08:00
John-David Dalton
3e0c565019 Add failing test case for current _.debounce patch. 2013-11-05 21:12:43 -08:00
John-David Dalton
984603112f Push delay back to see if it helps timing tests in travis/sauce. 2013-11-05 19:49:46 -08:00
John-David Dalton
fe29246256 Merge pull request #389 from jayphelps/leaky-pipes
Fixed memory leak with debounce/throttle arguments and context.
2013-11-05 19:04:13 -08:00
Jay Phelps
84d0664112 Fixed memory leak with debounce/throttle arguments and context 2013-11-05 18:50:39 -08:00
John-David Dalton
3d3c59cea6 Minor style tweaks and simplify travis.yml. 2013-11-05 09:28:11 -08:00
John-David Dalton
7940428b9b Add _.bind, _.partial, _.partialRight, & _.curry tests for function length. 2013-11-05 08:36:32 -08:00
John-David Dalton
2e485b9ac5 Tweak test filters for backbone and underscore. 2013-11-05 08:36:02 -08:00
John-David Dalton
b76aa926f6 Add underscore build tests to sauce. 2013-11-05 08:35:31 -08:00
John-David Dalton
58d81546da Minor cleanup in saucelabs.js. 2013-11-05 00:22:50 -08:00
John-David Dalton
7a480990c6 Avoid underscore timing tests in sauce. 2013-11-04 23:18:39 -08:00
John-David Dalton
afb10efd83 Avoid false fail on _.debounce test. 2013-11-04 22:15:29 -08:00
John-David Dalton
e2f05e137f Ensure only 4 sauce runs at once. 2013-11-04 21:38:35 -08:00
John-David Dalton
d72ade9c70 Leverage tunnels in sauce now that sauce-tunnel is updated. 2013-11-04 20:35:29 -08:00
John-David Dalton
64650fcdee Allow sauce to test IE6/7 for Backbone. 2013-11-04 19:31:56 -08:00
John-David Dalton
e1acb7df13 Fix typo. 2013-11-04 09:09:01 -08:00
John-David Dalton
319a30cf3a Tweak wording in readme. [ci skip] 2013-11-04 09:07:32 -08:00
John-David Dalton
e631f1b313 Avoid lodash use in test setups. 2013-11-04 09:07:07 -08:00
John-David Dalton
617f31b47f Make _.reduce, _.reduceRight, & _.transform to use lodash.createCallback. [closes #388] 2013-11-04 08:01:32 -08:00
John-David Dalton
61e9aac92d Avoid buggy tests in safari in sauce. 2013-11-03 22:38:15 -08:00
John-David Dalton
75812804f4 Rebuild minified builds after uglifyjs update. 2013-11-03 20:56:27 -08:00
John-David Dalton
b60f36f211 Tweak timing tests. 2013-11-03 20:38:17 -08:00
John-David Dalton
e342c878d0 Reduce tests so travis-ci won't timeout. 2013-11-03 15:42:02 -08:00
John-David Dalton
c6b3cadf55 Adjust sauce underscore/backbone settings. 2013-11-03 14:38:16 -08:00
John-David Dalton
869a361d09 Add underscore tests to sauce. 2013-11-03 12:49:15 -08:00
John-David Dalton
f83119e188 Avoiding timing issue with _.debounce test and enable sauce support for backbone tests. 2013-11-03 08:07:44 -08:00
John-David Dalton
578c4b444c Add backbone tests to sauce. 2013-11-03 01:08:21 -08:00
John-David Dalton
d63f9be03f Fix legacy and mobile paths in sauce. 2013-11-03 01:14:25 -07:00
John-David Dalton
62fe02415a Fix compat minified build. 2013-11-03 00:20:55 -07:00
John-David Dalton
481970c763 Add quotes to urls in .travis.yml. 2013-11-02 23:35:56 -07:00
John-David Dalton
7c8dc66ba1 Continue tweaking timing based tests. 2013-11-02 23:35:36 -07:00
John-David Dalton
20ffbf5a82 Use the process.cwd() in sauce labs and unroll sauce tests in travis.yml. 2013-11-02 22:52:38 -07:00
John-David Dalton
2b6f26b214 Run sauce labs in node v0.8 until travis-ci updates their 0.10 version. 2013-11-02 21:38:41 -07:00
John-David Dalton
d743ec2d2b Cleanup travis.yml, tweak how pull requests are handled in saucelabs.js, and tweak timing tests in test/test.js. 2013-11-02 20:53:51 -07:00
John-David Dalton
dfab332285 Auto create platforms list based on test url params. 2013-11-02 14:57:58 -07:00
John-David Dalton
bbbce8a981 Change commit depth to 10 in .travis.yml. [ci skip] 2013-11-02 14:35:48 -07:00
John-David Dalton
0dc4ccb42f Add the partial tunnel support back but don't run parallel jobs until sauce fixes their support. 2013-11-02 14:27:38 -07:00
John-David Dalton
b46c2c2527 Remove tunnelId support as it's not fully supported by sauce labs atm. 2013-11-02 14:07:17 -07:00
John-David Dalton
3b128f844b Experiment with a different tunnel id. 2013-11-02 13:44:31 -07:00
John-David Dalton
d38b3d09ba Tweak sauce labs test completion wait time. 2013-11-02 13:26:30 -07:00
John-David Dalton
d35c5ffa04 Update builds and add tunnelId to saucelabs.js. 2013-11-02 13:07:42 -07:00
John-David Dalton
eb7243233e Add IE compat mode testing to travis-ci. 2013-11-02 10:56:00 -07:00
John-David Dalton
21bf629505 Fix typo in saucelabs.js. 2013-11-02 10:13:28 -07:00
John-David Dalton
702022001d Try to avoid more false fails w/ time related tests. 2013-11-02 09:50:19 -07:00
John-David Dalton
d9549ad634 Make saucelabs.js skip running for pull requests, avoid errors when no result object is returned, and add IE 11 to the list of tested browsers. 2013-11-02 09:32:35 -07:00
Blaine Bublitz
daf91dbf95 switch from connect to ecstatic for sauce tests, parse URL for compat in querystring and set header 2013-11-02 00:59:52 -07:00
John-David Dalton
2bc19120d9 Avoid false fail for a _.throttle test in some VMs. 2013-11-01 23:28:20 -07:00
John-David Dalton
8ddfa8cd68 Add _.isEqual tests for wrapped and unwrapped values. 2013-11-01 19:13:36 -07:00
John-David Dalton
076d10358e Add the last of the underscore _.isEqual unit tests. 2013-10-31 22:59:23 -07:00
John-David Dalton
5930983641 Update link to custom builds documentation. [ci skip] 2013-10-31 09:31:08 -07:00
John-David Dalton
a0c5cb51aa Add more _.isEqual tests and ensure _.isEqual(_(false), _(false)) will compare correctly. 2013-10-31 09:01:40 -07:00
John-David Dalton
8e659745fd Update readme. 2013-10-31 00:06:11 -07:00
John-David Dalton
87297d2a07 Cleanup saucelabs.js round two. 2013-10-31 00:02:47 -07:00
John-David Dalton
8f23611f1a Rename window to root. 2013-10-31 00:02:19 -07:00
John-David Dalton
e2affb0f38 See what process.env logs in saucelabs.js. 2013-10-30 20:15:19 -07:00
John-David Dalton
26e6041b7a Reduce false fails at the expense of explicitness. 2013-10-30 19:34:48 -07:00
John-David Dalton
81707a45d5 Fix typo in builds. 2013-10-30 19:34:21 -07:00
John-David Dalton
805f2b28a9 Update builds & docs. 2013-10-30 09:46:58 -07:00
John-David Dalton
22aa02895e Add propertyIsEnumerable check to the _.isArguments fallback. [closes #382] 2013-10-30 09:24:25 -07:00
John-David Dalton
6bb89778b2 Expose _.noop. [closes #380] 2013-10-30 09:20:56 -07:00
John-David Dalton
6631b9e78f Hide passing tests by default. 2013-10-30 01:09:10 -07:00
John-David Dalton
7f7d5b32da Remove debug from perf.js. 2013-10-30 01:04:36 -07:00
John-David Dalton
52def444ab Update builds after cleanup. 2013-10-30 01:04:01 -07:00
John-David Dalton
7d52ab7c54 Add _.partial perf tests. 2013-10-29 23:58:40 -07:00
John-David Dalton
852b324819 Rename createBound to createWrapper and break createWrapper apart. 2013-10-29 23:58:16 -07:00
John-David Dalton
e019441ede Remove opera from sauce labs as they are unable to launch on their end. 2013-10-29 09:33:54 -07:00
John-David Dalton
ac8f8d0dd6 Ensure _.min and _.max can be used as the callback of _.map. [closes #379] 2013-10-29 09:32:40 -07:00
John-David Dalton
3fa2e7e12e Avoid false fail in older firefox. 2013-10-29 08:56:24 -07:00
John-David Dalton
5d099491df Tweak platforms in saucelabs.js. 2013-10-29 01:22:50 -07:00
John-David Dalton
d7ca0f7734 Remove trailing comma. 2013-10-29 01:17:32 -07:00
John-David Dalton
5d31338b02 Move isV8 and setImmediate assignment after nativeCreate is assigned. 2013-10-29 01:14:12 -07:00
John-David Dalton
a44b81d240 Add browsers to saucelabs.js. 2013-10-29 00:45:02 -07:00
John-David Dalton
742e499de0 Remove native Function#bind use. 2013-10-29 00:00:07 -07:00
John-David Dalton
eb395d6d2d Cleanup perf.js. 2013-10-28 23:25:51 -07:00
John-David Dalton
a1383c34b5 First round of sauce support cleanup. 2013-10-28 09:29:57 -07:00
John-David Dalton
e538da3959 Merge branch 'master' of github.com:lodash/lodash 2013-10-28 09:10:37 -07:00
John-David Dalton
687a072dc8 Cleanup tests and add more _.isEqual tests. 2013-10-28 09:10:26 -07:00
John-David Dalton
5dc9881241 Merge pull request #376 from pimterry/saucelabs
Automatic browser tests with SauceLabs in Travis. [ci skip]
2013-10-28 08:22:40 -07:00
pimterry
0b3a7e2f0f Move saucelabs test config into /test 2013-10-28 10:55:34 +00:00
pimterry
123455a5bb Move saucelabs to an explicit travis case, out of the build matrix
This avoids us rebuilding it with every other combination (saucelabs + node .6/8/.10), as that's not really useful
2013-10-28 00:15:10 +00:00
pimterry
34c8d8dd2e Improve console logging output for saucelabs tests, and explicitly close sauce connect 2013-10-28 00:14:59 +00:00
pimterry
3f4c92d739 Add test listener to QUnit to report results for saucelabs 2013-10-28 00:09:45 +00:00
pimterry
eb10245df1 Moved sauce connect management to saucelabs.js, for manual control 2013-10-28 00:09:40 +00:00
Tim Perry
2dbfcbb378 Updated travis config to run the saucelabs tests for various browsers 2013-10-28 00:07:22 +00:00
Tim Perry
a717f5c030 Initial working saucelabs test result recording 2013-10-28 00:07:16 +00:00
Tim Perry
3a711790c5 PoC saucelabs test runner 2013-10-27 22:55:11 +00:00
John-David Dalton
5d77cb0396 Update underscore build with _.difference patch from lodash-cli. [closes #373] 2013-10-26 00:26:23 -07:00
John-David Dalton
9972ea578b Update builds. 2013-10-26 00:25:42 -07:00
John-David Dalton
0bb3762397 Simplify environment detections. 2013-10-26 00:25:09 -07:00
John-David Dalton
fbd6e21152 Add more "Objects" tests to test/test.js. 2013-10-25 09:36:27 -07:00
John-David Dalton
bea62537df Fix asyncTest with rhino -require. 2013-10-25 00:38:19 -07:00
John-David Dalton
fdbe4c5bd5 Avoid broken Function#bind in Narwhal. 2013-10-24 22:45:33 -07:00
John-David Dalton
91e779a52c Remove secure sauce access key since @pimterry is on the case. 2013-10-24 22:25:21 -07:00
John-David Dalton
e2c5e92cd3 Fix failing tests for rhino -require. 2013-10-24 09:09:18 -07:00
John-David Dalton
5929676ea2 Add more "Objects" test and fix tests for node. 2013-10-24 00:18:02 -07:00
John-David Dalton
36e180ab91 Add more "Objects" tests and fix failing tests. 2013-10-23 23:54:03 -07:00
John-David Dalton
1e8fe22553 Use internal slice instead of nativeSlice.call when converting arguments to arrays. 2013-10-23 21:55:05 -07:00
John-David Dalton
8e1bd2d8f3 Add more of Underscore's "Objects" tests to test/test.js. 2013-10-23 21:38:16 -07:00
John-David Dalton
239ce262ef Add sauce secure key in the hope that someone will complete the work required to get sauce testing working. 2013-10-22 22:16:27 -07:00
John-David Dalton
5be66e98c2 Fix flakey _.throttle unit test. 2013-10-22 21:54:47 -07:00
John-David Dalton
cacd072c15 Add "Objects" tests from Underscore to test/test.js. 2013-10-22 09:28:23 -07:00
John-David Dalton
14c6a1bf23 Add docs to an advanced section of createBound. [ci skip] 2013-10-22 09:27:33 -07:00
John-David Dalton
b27dfd4c77 Escape asterisks and other characters in generated docs. [ci skip] 2013-10-21 22:45:37 -07:00
John-David Dalton
4622e9658d Fix doc link hashes for github. [ci skip] 2013-10-21 21:31:08 -07:00
John-David Dalton
f8bda517c3 Add the rest of the underscore "Functions" tests to test/test.js. 2013-10-21 09:21:02 -07:00
John-David Dalton
de3d9fdb8b Fix more doc typos and add more underscore "Functions" tests to test/test.js. 2013-10-21 00:35:01 -07:00
John-David Dalton
c6291bea52 Fix various doc typos and update builds. 2013-10-20 23:48:33 -07:00
John-David Dalton
a266e3c898 Ensure functions are rebound correctly by shallow cloning the __bindData__ before passing it to createBound. [closes #371] 2013-10-20 23:45:53 -07:00
John-David Dalton
f9c34d6808 Add more underscore "functions" tests to test/test.js. 2013-10-20 23:35:42 -07:00
John-David Dalton
10a91cac2f Add more underscore _.template tests to test/test.js. 2013-10-20 17:38:57 -07:00
John-David Dalton
f7e25e9c63 Add note about _.create and update support section of readme. [ci skip] 2013-10-20 17:02:32 -07:00
Kevin Ji
5f821a58a3 Update contributor links. [ci skip] 2013-10-20 17:01:46 -07:00
Kevin Ji
4a2ad4e6f9 Use https for all Twitter contributor links 2013-10-20 13:17:30 -07:00
John-David Dalton
4a2bbb52c1 Fix remove circular dependency in _.create by adding baseCreate. 2013-10-19 16:20:15 -07:00
John-David Dalton
ed401199bd Allow _.create to accept a properties object and rebuild docs and other builds. 2013-10-19 14:57:12 -07:00
John-David Dalton
eee3a263f5 Add _.create to chaining docs. [ci skip] 2013-10-19 13:15:39 -07:00
John-David Dalton
eca1d9aabd Don't expose _.create for underscore build. 2013-10-19 08:38:57 -07:00
John-David Dalton
33ff9cfbb6 Add _.create and alias tests. 2013-10-19 01:08:32 -07:00
John-David Dalton
de8e6d7174 Add _.create. 2013-10-19 01:08:09 -07:00
John-David Dalton
cd9332cddf Add comment to _.parseInt. [ci skip] 2013-10-18 22:18:15 -07:00
John-David Dalton
fb4a861c0d Reduce _.wrap by taking advantage of createBound. 2013-10-18 08:21:30 -07:00
John-David Dalton
c30460df4c Optimize _.isBoolean, _.isNumber, and _.isString for the false case. 2013-10-17 23:59:02 -07:00
John-David Dalton
31e86a36f8 Ensure _.isEqual works with objects created by Object.create(null). 2013-10-17 22:53:40 -07:00
John-David Dalton
0b4fe85b33 Update vendor/curl to 0.8.4. 2013-10-17 09:05:46 -07:00
John-David Dalton
99e7a1705a Update vendor/requirejs to 2.1.9. 2013-10-16 23:28:34 -07:00
John-David Dalton
27c6259b53 Add more underscore "utilities" methods tests. 2013-10-15 22:28:01 -07:00
John-David Dalton
1ecae14bae Move Underscore's chaining tests to test/test.js. 2013-10-15 09:08:45 -07:00
John-David Dalton
c56a09f318 Add doc note to _.forEach about array-like objects. [closes #339] [ci skip] 2013-10-14 23:48:24 -07:00
John-David Dalton
ffec2699ea Add wiki resources page to the readme. [ci skip] 2013-10-14 22:52:00 -07:00
John-David Dalton
46faf0280c Add the rest of the underscore "Collections" tests to test/test.js. 2013-10-14 09:14:54 -07:00
John-David Dalton
3b774ed507 Add JavaScript Jabber podcast to readme. [ci skip] 2013-10-13 21:57:32 -07:00
John-David Dalton
9c62bbbc05 Use npm i shorthand in .travis.yml. [ci skip] 2013-10-13 19:19:08 -07:00
John-David Dalton
dc6b1ef47b More doc tweaks/cleanup. [ci skip]. 2013-10-13 18:06:23 -07:00
John-David Dalton
1f8e1d2a29 Fix typo in baseRandom doc. [ci skip] 2013-10-13 15:55:30 -07:00
John-David Dalton
b30a948601 Update builds, docs, and add a unit test for the _.findWhere alias. 2013-10-13 15:28:51 -07:00
John-David Dalton
e90568e044 Ensure .travis.yml builds the modern build, even though it's available under a different name. 2013-10-13 12:13:31 -07:00
John-David Dalton
c74b5ba3a2 Update vendor/qunit-clib to throw errors for failed tests in ringo, rhino, & narwhal. 2013-10-13 11:26:22 -07:00
John-David Dalton
2085d6afad Ensure minified builds don't mung eachRight. 2013-10-13 11:01:03 -07:00
John-David Dalton
8bfdbd0fed Ensure test fails are reported correctly via .travis.yml. 2013-10-13 10:44:08 -07:00
John-David Dalton
cc3dc6aff0 Fix doc typos. 2013-10-12 21:00:53 -07:00
John-David Dalton
d01284d147 Changes stooges to flintstones and add doc examples to _.findIndex, _.findLastIndex, _.findKey, and _.findLastKey for "_.pluck" and "_.where" shorthands. [closes #362] 2013-10-11 23:47:44 -07:00
John-David Dalton
7b7d5118d6 Add more Underscore "Collections" unit tests to test/test.js. 2013-10-11 23:39:27 -07:00
John-David Dalton
a03a7dcb4a Update vendor/backbone to v1.1.0. 2013-10-10 22:27:32 -07:00
John-David Dalton
dfae413afc Move more Underscore tests into test/test.js. 2013-10-09 21:52:04 -07:00
John-David Dalton
253642a85e Cleanup _.throttle return statement. 2013-10-08 19:33:59 -07:00
John-David Dalton
ce64c8e7d1 Update tested Chrome version in readme. [ci skip] 2013-10-08 00:37:45 -07:00
John-David Dalton
d7ae0105c3 Fix typo in _.range test. 2013-10-07 23:52:15 -07:00
John-David Dalton
e7320e7bd3 Fix typo in _.range doc example. 2013-10-07 23:49:58 -07:00
John-David Dalton
a214565803 Add Underscore's "Array" method category tests to test/test.js. 2013-10-07 23:49:03 -07:00
John-David Dalton
61f1290bea Update vendor/curl.js to v0.8.2. 2013-10-06 23:57:58 -07:00
John-David Dalton
ba5e512d10 Ensure _.template supports single line comments in "evaluate" delimiters in minified builds. [closes #361] 2013-10-05 23:21:47 -07:00
John-David Dalton
624e4bca40 Tweak __bindData__ detection in createBound. 2013-10-04 23:17:06 -07:00
John-David Dalton
613237727d Update path to perf-ui.js in perf/index.html. [ci skip] 2013-10-04 22:36:43 -07:00
John-David Dalton
fd2ddca6f2 Extend baseCreateCallback to functions bound with native Function#bind and those with __bindData__ of false. 2013-10-04 22:35:45 -07:00
John-David Dalton
e114c18031 Ensure _.template coerces the text argument to a string. 2013-10-03 23:30:49 -07:00
John-David Dalton
49e22742de Add test for incorrectly shimmed Object.create. 2013-10-03 09:42:32 -07:00
John-David Dalton
422d7942ef Bump to v2.2.1. 2013-10-03 00:30:29 -07:00
John-David Dalton
a63e7162bc Make doc/parse.php read the version from package.json. [ci skip] 2013-10-02 23:21:41 -07:00
John-David Dalton
1f973b72b8 Keep createObject fallback for modern builds. 2013-10-02 19:47:15 -07:00
John-David Dalton
d3dd97f167 Fix _.mixin creates functions that respect __chain__. 2013-10-02 19:30:49 -07:00
John-David Dalton
f0f17e0041 Updated the tested version of Node.js to 0.10.20 in readme. [ci skip] 2013-10-01 22:20:26 -07:00
John-David Dalton
d6fa8bf233 Add _.pluck to backbone.html in anticipation of Backbone's version bump. [ci skip] 2013-10-01 22:04:43 -07:00
John-David Dalton
ec5e685a1c Remove unneeded keywords from component.json. [ci skip] 2013-10-01 08:39:03 -07:00
John-David Dalton
c88b95751c Reduce setting MAKE in .travis.yml. 2013-09-30 20:21:59 -07:00
John-David Dalton
72ae25bc53 Log the params passed to test.js to the console. 2013-09-30 19:33:18 -07:00
John-David Dalton
02e5cc1da8 Add asset folders and cache busting to worker.js. 2013-09-30 18:53:04 -07:00
John-David Dalton
3d092df56d Tweak isModularize detection. [ci skip] 2013-09-29 20:33:13 -07:00
John-David Dalton
912d5c700c Change before_script to the more appropriate before_install in .travis.yml. 2013-09-29 20:21:45 -07:00
John-David Dalton
6d3c492518 Extend test/test.js to support testing generated npm packages. 2013-09-29 19:19:02 -07:00
John-David Dalton
5e29e3f1cb Tweak wording on _.clone feature note in readme & tweak unit test handling missing _.runInContext. 2013-09-29 14:46:52 -07:00
John-David Dalton
0558495760 Update _.clone unit test for older Safari. 2013-09-29 12:30:34 -07:00
John-David Dalton
0471dfa2f8 Update vendor/qunit-clib to avoid logInline when running on Windows. 2013-09-29 09:53:05 -07:00
John-David Dalton
7883e6544e Remove modularize entry in test-ui.js, update isModularize detection, and avoid a false fail in old Opera. 2013-09-28 22:14:05 -07:00
John-David Dalton
6da87e4a79 Bump to v2.2.0. 2013-09-28 20:29:54 -07:00
John-David Dalton
bafe4fff93 Update vendor/qunit-clib and validate assert counts in each unit test. 2013-09-28 18:27:07 -07:00
John-David Dalton
da782398a2 Allow test.'s to support rhino -require with modularized builds. 2013-09-28 17:13:24 -07:00
John-David Dalton
4b26b46f6a Remove unneeded code from the underscore build of the support object. 2013-09-28 14:02:12 -07:00
John-David Dalton
0f1e69a2df Tweak how isModularize is detected in test/test.js. 2013-09-28 00:25:56 -07:00
John-David Dalton
85f2bd464c Remove "performance" & "speed" keywords from package.json. [ci skip] 2013-09-26 23:47:26 -07:00
John-David Dalton
8a4956b736 Remove openjdk6 from .travis.yml. 2013-09-26 21:55:14 -07:00
John-David Dalton
4a369af4c7 Cleanup baseClone. 2013-09-26 21:05:10 -07:00
John-David Dalton
9749305ecd Make _.clone shallow clone dates, regexps, and boolean/number/string objects. [closes #358] 2013-09-26 20:07:07 -07:00
John-David Dalton
639178dbdc Make qunit-clib less chatty for passed tests. 2013-09-26 08:12:33 -07:00
John-David Dalton
62d038b547 Fix typo in .travis.yml. 2013-09-26 01:10:22 -07:00
John-David Dalton
9b80e3a33b When floating in _.random avoid getting 0 too many times when using arguments like min of -3 and max of 3. 2013-09-25 23:24:58 -07:00
John-David Dalton
0ea54f0458 Optimize .travis.yml narwhal, ringo, and rhino use. 2013-09-25 22:56:51 -07:00
John-David Dalton
374c52f71f Use ln as shorthand for link in the "Notes" section of the readme . [ci skip] 2013-09-25 09:09:04 -07:00
John-David Dalton
60f63e125a Experiment with downloading rhino, ringo, narwhal via .travis.yml. 2013-09-25 07:52:48 -07:00
John-David Dalton
7cfa7f3de4 Use now() in the compat and underscore builds too. 2013-09-24 19:10:09 -07:00
John-David Dalton
92409831c2 Reduce dependency on getObject. 2013-09-24 00:10:16 -07:00
John-David Dalton
e04790a628 Update docs to make the list of aliases more descriptive. [ci skip] 2013-09-23 09:12:50 -07:00
John-David Dalton
cd7bf40508 Have the npm packages link in the readme use the "lodash-modularized" keyword. [ci skip] 2013-09-23 08:38:52 -07:00
John-David Dalton
dc378e9ce7 Bump to v2.1.0. 2013-09-22 22:55:14 -07:00
John-David Dalton
5fcdcec1a8 Tweak test-ui.js for changes in the modularize build option. [ci skip] 2013-09-22 01:15:50 -07:00
John-David Dalton
8773704c8b Strengthen the UMD. 2013-09-20 23:01:53 -07:00
John-David Dalton
291fd1857e Reduce our readme and update docdown. [ci skip] 2013-09-20 21:18:26 -07:00
John-David Dalton
0aa4aeaddc Change directory in .travis.yml before running unit tests. 2013-09-20 19:52:49 -07:00
John-David Dalton
ca81f1b2e8 Add floating argument to _.random. [closes #354] 2013-09-20 00:21:42 -07:00
John-David Dalton
fca3a14410 Update readme with download descriptions. 2013-09-19 23:49:44 -07:00
John-David Dalton
d105e80ed8 Add "include" to .travis.yml. 2013-09-19 22:23:27 -07:00
John-David Dalton
ce63faa597 Add "matrix" to .travis.yml. 2013-09-19 21:12:17 -07:00
John-David Dalton
25c1b63a00 Fix doc typo in _.where. [ci skip] [closes #353, #355] 2013-09-19 18:40:58 -07:00
John-David Dalton
548728abba Avoid PhantomJS 1.9.2 bug in .travis.yml. 2013-09-19 09:33:33 -07:00
John-David Dalton
2ebdbd565a Add tests to check that _.support properties aren't minified. 2013-09-19 09:20:42 -07:00
John-David Dalton
86376616ff Remove testing modern builds by phantomjs in .travis.yml. 2013-09-19 08:53:55 -07:00
John-David Dalton
7c6865f948 Ensure reThis isn't used in Windows 8 apps. 2013-09-19 08:53:19 -07:00
John-David Dalton
c2da0070f5 Add legacy and mobile builds to .travis.yml. 2013-09-18 23:27:11 -07:00
John-David Dalton
bf2a2aed66 Fix typo in _.template docs. 2013-09-18 21:13:34 -07:00
John-David Dalton
403ea0a0e1 Fix _.compose unit test. 2013-09-18 01:20:08 -07:00
John-David Dalton
27976cbe1a Add notes about Infinity and -Infinity to _.min and _.max docs. 2013-09-17 22:54:42 -07:00
John-David Dalton
70147396a4 Add mid check to createCache bailout. 2013-09-17 22:53:10 -07:00
John-David Dalton
d6aed16e7c Allow _.compose to be called without arguments. [closes #352] 2013-09-17 19:40:48 -07:00
John-David Dalton
0414bae820 Avoid creating an enumerable Function#bind in test/index.html. 2013-09-17 19:30:01 -07:00
John-David Dalton
620866bc39 Ensure _.flatten handles empty arrays. 2013-09-17 19:29:09 -07:00
John-David Dalton
55f080e33f Optimize _.isArray fallback, baseFlatten, & _.isArguments for plain objects. 2013-09-17 08:58:18 -07:00
John-David Dalton
9f2b1b03d7 Don't restore undefined native methods in test/index.html. 2013-09-17 00:16:40 -07:00
John-David Dalton
c0a0f3aaf5 Minor whitespace nits in test and perf ui. [ci skip] 2013-09-17 00:05:21 -07:00
John-David Dalton
7726b5c56b Add more bad shim tests. 2013-09-16 23:57:01 -07:00
John-David Dalton
3daff8ab8a Decode custom test/perf build urls. 2013-09-16 23:56:26 -07:00
John-David Dalton
428c2097c7 Cleanup baseFlatten. 2013-09-16 21:20:14 -07:00
John-David Dalton
7786583ecf Avoid long fail message in _.flatten unit test. 2013-09-16 07:25:32 -07:00
John-David Dalton
9b79ea7d30 Minor doc tweaks. [ci skip] 2013-09-15 23:12:04 -07:00
John-David Dalton
3dc8436362 Ensure _.flatten works with extremely large arrays. [closes #349] 2013-09-15 18:37:09 -07:00
John-David Dalton
9f1f2a4845 Keep the defineProperty fallback in place so it can be used in phantom.js without throwing an error. 2013-09-15 17:29:18 -07:00
John-David Dalton
40204e8133 Cleanup docs. 2013-09-15 17:17:57 -07:00
John-David Dalton
133b1067c5 Add Node 0.8 to .travis.yml. 2013-09-14 00:09:56 -07:00
John-David Dalton
5c8287203e Adjust .gitignore to only ignore .min files in the root. 2013-09-13 21:39:12 -07:00
John-David Dalton
061bbb1914 Add lodash source to "files" in package.json. 2013-09-13 21:18:41 -07:00
John-David Dalton
572168ef20 Update Underscore version in license. [ci skip] 2013-09-13 21:18:04 -07:00
John-David Dalton
1aa27f2da3 Change link to npm lodash packages in readme. [ci skip] 2013-09-13 21:16:12 -07:00
John-David Dalton
be76614c90 Update various package configs. 2013-09-13 20:22:09 -07:00
John-David Dalton
e26d355fb7 Minor readme cleanup. 2013-09-13 09:24:55 -07:00
John-David Dalton
d8dbcef5dd Bump to v2.0.0. 2013-09-13 00:10:59 -07:00
John-David Dalton
5d6a6590bf Make worker unit test runnable in older Firefoxes. 2013-09-12 21:11:10 -07:00
John-David Dalton
7dfdfe5b50 Simplify _.bind benchmark. 2013-09-12 20:09:35 -07:00
John-David Dalton
36fcc460f4 Avoid issues with engines that can't manipulate arguments objects with array methods. 2013-09-12 20:09:28 -07:00
John-David Dalton
24b03d42d6 Fix dojo loader in IE < 9. [ci skip] 2013-09-11 22:16:22 -07:00
John-David Dalton
60275d3637 Add "amd" keyword to package.json. [ci skip] 2013-09-11 08:18:47 -07:00
John-David Dalton
9b5b471802 Update Underscore version in copyright header. [ci skip] 2013-09-11 00:18:23 -07:00
John-David Dalton
1edb96f526 Update vole and jam ignore entries. 2013-09-09 21:25:09 -07:00
John-David Dalton
f949bdcfe4 Update builds and docs. 2013-09-09 08:54:39 -07:00
John-David Dalton
21a45a940e Ensure _.first, _.last, and _.sample return the undefined if called with a falsey argument or an empty array if called with a falsey argument and an n value. 2013-09-09 08:21:24 -07:00
John-David Dalton
fb61dfd39d Reduce use of undefined literal. 2013-09-09 07:26:57 -07:00
John-David Dalton
9b5940505b Add _.sample benchmark. 2013-09-08 18:14:48 -06:00
John-David Dalton
8c07a67fe9 Ensure _.sample handles falsey collection arguments. 2013-09-08 15:09:09 -06:00
John-David Dalton
0f9687ce62 Revert part of the PhantomJS cleanup. 2013-09-08 15:07:59 -06:00
John-David Dalton
1460e46d1f Optimize _.sample. 2013-09-08 01:14:42 -05:00
John-David Dalton
692521c49d Update docs and dist. 2013-09-08 00:28:54 -05:00
John-David Dalton
2f1d8cc196 Ensure _.debounce passes vendor/underscore unit tests. 2013-09-07 16:49:10 -05:00
John-David Dalton
eeabb47fb6 Update vendor/underscore to 1.5.2. 2013-09-07 14:38:53 -05:00
John-David Dalton
e078f584eb Cleanup _.debounce. 2013-09-07 08:55:32 -05:00
John-David Dalton
f86322545a Tweak paths in package.json. 2013-09-06 01:21:26 -05:00
John-David Dalton
720e19a01f Cleanup phantomjs support in test.js. 2013-09-05 20:33:52 -05:00
John-David Dalton
3560fed86e Fix test runner with phantomjs and dojo loader. 2013-09-05 00:19:58 -05:00
John-David Dalton
5f8f5a9f85 Add a console.log in test.js when PhantomJS fails to load a given page. 2013-09-04 20:58:10 -05:00
John-David Dalton
1aae24b831 Cleanup _.template docs. [ci skip] 2013-09-04 18:37:50 -05:00
John-David Dalton
b544b1c3d4 Replace var window with root in test.js. 2013-09-04 18:36:14 -05:00
John-David Dalton
f462f87183 Finish making tests runnable for lodash-amd. 2013-09-04 00:07:00 -05:00
John-David Dalton
6ed7ef25b2 Simplify package.json. 2013-09-03 23:12:22 -05:00
John-David Dalton
bc79d09f2d Update vendors, builds, and docs. 2013-09-03 23:11:34 -05:00
John-David Dalton
5b2becb87f Extend phantomjs to work with lodash-amd. 2013-09-03 23:10:49 -05:00
John-David Dalton
cd808fb5a5 Change how lodash-modularie build path is resolved. 2013-09-02 01:01:59 -05:00
John-David Dalton
c8a4e40bcf Use dev branch version of curl-kitchen-sink. 2013-09-02 00:46:22 -05:00
John-David Dalton
911b6c9679 Adjust .travis.yml for consistency. 2013-09-01 19:25:46 -05:00
John-David Dalton
03041f87c3 Tweak how filePath is resolved to work with lodash-node. 2013-09-01 19:25:19 -05:00
John-David Dalton
360c53d6ca Add license to package.json. 2013-09-01 01:34:10 -05:00
John-David Dalton
3f1d555c71 Detect paths containing lodash-amd and lodash-node as modularized. 2013-08-31 13:10:13 -07:00
John-David Dalton
ae1d72265c Make "ignore" entries consistent across package configs. [ci skip] 2013-08-31 12:54:40 -07:00
John-David Dalton
9570c65d88 Tweak Blaine's gravatar src in readme. 2013-08-30 08:59:36 -07:00
John-David Dalton
3e0b04509a Remove mobile builds from /dist/ as their in cons. 2013-08-30 08:51:29 -07:00
John-David Dalton
0884379e0b Correct repo links in contributing.md. 2013-08-30 08:51:29 -07:00
John-David Dalton
ec16532028 Cleanup dot (.) files. 2013-08-30 08:51:29 -07:00
John-David Dalton
c8f13544a8 Remove legacy and backbone builds from dist/. 2013-08-30 08:51:29 -07:00
John-David Dalton
44bfe55413 Move curl.js. 2013-08-30 08:51:29 -07:00
John-David Dalton
b95c1adc86 Use truey instead of truthy, /ht @brucelawson. [ci skip] 2013-08-30 08:51:29 -07:00
John-David Dalton
b3a94c26d9 Remove lesser used backbone and legacy builds from the npm package. 2013-08-30 08:51:28 -07:00
John-David Dalton
159c7238a8 Update repo links in readme. [ci skip] 2013-08-30 08:51:28 -07:00
John-David Dalton
70f40bab1d Add @phated to the contributors in package.json. [ci skip] 2013-08-30 08:51:28 -07:00
John-David Dalton
6c1a9dc14b Rework the doc example for _.after. 2013-08-30 08:51:28 -07:00
John-David Dalton
816381a6a8 Use location.host in test/index.html and test/underscore.html.
Former-commit-id: 34dd4860b7b83ec9b96b3f9062654bdf960ff75f
2013-08-30 08:50:43 -07:00
Blaine Bublitz
dd84bca638 curl legacy loader
Former-commit-id: 08c7c76abe03823e3cdb0e25f76c969fa073226e
2013-08-30 08:50:43 -07:00
John-David Dalton
a5d2019a39 Tweak _.template docs.
Former-commit-id: 7c8842f046bcb1a736c1dddca5871cc78d8a5ceb
2013-08-28 19:57:49 -07:00
John-David Dalton
26cee564c9 Add @phated under the Contributors section of the read me.
Former-commit-id: 9666cfd0e46a307466497e864b142e97771a0215
2013-08-28 19:53:00 -07:00
Blaine Bublitz
316b8a1375 remove old curl, update to curl 0.8.1 kitchen sink dist and use curl legacy config for test instead of js! plugin
Former-commit-id: 9cba27cb9e0e7644a8a824b30fe5e85e85fc165e
2013-08-28 19:06:29 -07:00
John-David Dalton
618b25df08 Update repo paths in component.json and package.json.
Former-commit-id: 4c2b2498786c11d100cd82d006d0a98feba4586e
2013-08-28 11:14:55 -07:00
John-David Dalton
8f9c4cd217 Remove build from this repo to move to lodash-cli.
Former-commit-id: 0f9e802dd744a97494a10537442a28aae40dc72a
2013-08-28 11:14:38 -07:00
John-David Dalton
c6e2e33e87 Add IE fallback for lack of Function#name.
Former-commit-id: 42047271fe596ed064ce2b1a58b70e6c6cd8a4af
2013-08-27 22:34:23 -07:00
John-David Dalton
db605ea7ca Fix basePath in IE.
Former-commit-id: 3c78a042183ffbb52c22a6979f71f842d6a1ea38
2013-08-27 21:54:03 -07:00
John-David Dalton
a1507d4844 Sync underscore build with Underscore v1.5.1.
Former-commit-id: 333f720645f5ffec079bfe11558ed72a3956ed18
2013-08-27 09:12:50 -07:00
John-David Dalton
c6340a64fe Add _.createCallback unit test for calling without an argCount.
Former-commit-id: 1d9e14163a77564c9fecdba56590131e8cfcebe0
2013-08-27 08:22:04 -07:00
John-David Dalton
265b440c37 Tweak _.contains optimization.
Former-commit-id: 4c8040972806b2b18958379fde765858d22ceda8
2013-08-27 08:21:37 -07:00
John-David Dalton
ea8e6d978d Optimize _.contains for arrays.
Former-commit-id: 050743f77e7047f86d5b14b97d35846c9d2e749c
2013-08-26 22:32:20 -07:00
John-David Dalton
c3f5bc6bfb More JSDoc cleanup. [closes #334]
Former-commit-id: dcb55079320e3bcd35c3bf4f36d18f393f16e426
2013-08-26 22:01:44 -07:00
John-David Dalton
e322f6dbe2 Make backbone unit tests pass in IE6.
Former-commit-id: e709e017441d7902d5f09e6901cf4f586953723b
2013-08-26 00:05:00 -07:00
John-David Dalton
83059a013c Update vendor/underscore.
Former-commit-id: 833a6ca3e5a7f9d4a8b22e535d849c106526171e
2013-08-25 22:42:33 -07:00
John-David Dalton
e374392450 Rebuild dist/ files.
Former-commit-id: 3e9c51b17797b9a1ba702c4f38f24c3bc592c1d5
2013-08-25 20:43:30 -07:00
John-David Dalton
72d505b2f1 Update other vendors jsdoc comment blocks.
Former-commit-id: 3dcc92abe376d4c83baf6d2307c0a4343d5dce31
2013-08-25 20:40:24 -07:00
John-David Dalton
a11bff0c7b Make test.'s match var name usage in lodash.js.
Former-commit-id: 680581a0138315def67c213605140c74f7d6ee6a
2013-08-25 20:39:43 -07:00
John-David Dalton
a820ee4c82 Update vendor/docdown to parse more compliant jsdoc syntax.
Former-commit-id: cfd5d1a5eae3a2608ed49ea388c389fb1ea0e489
2013-08-25 20:39:12 -07:00
John-David Dalton
a18be78bd3 Allow defineProperty to be used in the lodash.compat build too.
Former-commit-id: c610fd24ca8cfefab4c355099a034a8b2542aa77
2013-08-25 16:49:42 -07:00
John-David Dalton
83b5806cec Improve jsdoc syntax. [closes #334]
Former-commit-id: a6ab2e8ac7c5b8abd0e63ee025552d6452a3e0a2
2013-08-25 13:01:41 -07:00
John-David Dalton
4d7a1199ea Track the dependents of root in build.js.
Former-commit-id: be19143f8741be40419f83b2919c44c2d19bc9ac
2013-08-25 10:20:53 -07:00
John-David Dalton
d47cac563a Ensure cacheIndexOf works correctly with boolean values.
Former-commit-id: 21f65952b14ddfff892a8c151545ad807a8ec9ef
2013-08-25 01:39:18 -07:00
John-David Dalton
2969290c63 Update contributing, package.json test entry, and add lodash-grunt to the readme. [ci skip]
Former-commit-id: d59c8db9593eb8893d728588f88ce8b2685f3594
2013-08-25 00:50:30 -07:00
John-David Dalton
277557cd99 Fix perf regressions in _.bind, _.groupBy, _.countBy, _.indexBy, and _.reduceRight.
Former-commit-id: 0972dd65af64b7cd1d7f2800a8a59c28183b8aba
2013-08-24 23:32:04 -07:00
John-David Dalton
21db7d438b Reduce the number of times clearTimeout is called in _.debounce.
Former-commit-id: 5b07b6660be4ff6783a8348fc8a122cfab5d10c4
2013-08-24 00:29:56 -07:00
John-David Dalton
61ff2da15c Replace window var with root to better grab the global when using custom IIFEs.
Former-commit-id: f79834c6b53d692e85801d6258cd8beb35c776c2
2013-08-23 08:44:33 -07:00
John-David Dalton
ad8296a535 Correct exportsOptions in build.js.
Former-commit-id: 35c8977e27bea40431392e02c300625ce6459cca
2013-08-22 09:22:31 -07:00
John-David Dalton
aec3318f4c Update vendors.
Former-commit-id: a2830d4097d13884391abe792c319bf1e699df08
2013-08-21 22:03:31 -07:00
John-David Dalton
3297c3a2e2 Round three of modularize exports=node support.
Former-commit-id: ac21e547a6717ddf362e06c031657c9fb18b8c85
2013-08-20 22:31:04 -07:00
John-David Dalton
84759de36f Round two of modularize exports=node support.
Former-commit-id: 8a764774804f194f3fa344219cc8464190c4405f
2013-08-20 09:23:02 -07:00
John-David Dalton
a562126f2f Make _.memoize avoid using keyPrefix if passed a resolver function. [closes #330]
Former-commit-id: 97e3bb353d988c92eea394dfb496ebf7594ae25f
2013-08-19 22:42:32 -07:00
John-David Dalton
1901134601 Add exports=npm and first round of modularize node.js support.
Former-commit-id: fd0ae2328312d5e28dd5d866dc56f613aff54817
2013-08-18 23:46:16 -07:00
John-David Dalton
eecb6986ee Cleanup _.sample and add missing dependency.
Former-commit-id: 428bbdb266bd1d66119007ed6121c3f810bd2cd1
2013-08-18 07:23:38 -07:00
John-David Dalton
508cada017 Add string test for _.shuffle.
Former-commit-id: 420789264a287b5431322b9871a3c1c219ff2722
2013-08-17 08:15:42 -07:00
John-David Dalton
2abae2f21a Add string test for _.sample.
Former-commit-id: 81836be99bc0439d24eb5e6b73a7e6c2803c9516
2013-08-16 23:33:13 -07:00
John-David Dalton
82c17dbde2 Update vendor/docdown.
Former-commit-id: 98cda48e4b63e2cd471c927ba36afbe2bb80938e
2013-08-16 00:31:10 -07:00
John-David Dalton
425499b3aa Add _.sample.
Former-commit-id: 00e27cca2a65e1310b26904173ffec18aa484e48
2013-08-16 00:26:41 -07:00
John-David Dalton
96605766bb Add _.memoize note to readme. [ci skip]
Former-commit-id: 769b9a03b0e2873e86acefcbc31c43f7179a9d54
2013-08-15 22:49:16 -07:00
John-David Dalton
161012b0a7 Ensure _.at can work as a callback for _.map and add similar unit tests for _.assign, _.defaults, _.merge, _.first, _.initial, _.last, and _.rest.
Former-commit-id: 92e71c6bae084029df3cc0e7af78af7ce7566be0
2013-08-15 00:34:09 -07:00
John-David Dalton
0669a053db Clarify a bit more the order is not guaranteed notes on object iteration.
Former-commit-id: bfe3033325bc941a03948fe41056634663a10989
2013-08-14 23:30:29 -07:00
John-David Dalton
ab66e77740 More consistent use of num argument in unit tests.
Former-commit-id: c835a0f19bae4a48572fee39d6db41fc7f34e2dc
2013-08-14 23:29:24 -07:00
John-David Dalton
381cd53551 Add sparse array tests for _.remove.
Former-commit-id: 0c21484ae459fbb1554c73348a566703523ff297
2013-08-13 23:42:29 -07:00
John-David Dalton
1f0e92a752 Add spare array test for _.pull.
Former-commit-id: 38d677a4f2693db0591a6b43fe5a66a7dae39883
2013-08-13 23:36:36 -07:00
John-David Dalton
98b3496717 Fix typo in perf.js.
Former-commit-id: d9572081f88cf96d50b868201eaf9d0b5bc4d63f
2013-08-12 00:04:43 -07:00
John-David Dalton
4200e2e4e4 Simplify delayed function in _.debounce.
Former-commit-id: 1f996fc3b6a8954053332739fdc0c2185fb1fd80
2013-08-10 21:24:49 -07:00
John-David Dalton
e239ae1aba Remove _.debounce from lodash/underscore build test as it's not replaced for the underscore build.
Former-commit-id: 64648d1cc1636bf76748d4396c1a2606fbca1e32
2013-08-10 01:19:55 -07:00
John-David Dalton
2acfc307b7 Use a state object for buildTemplate like buildModule.
Former-commit-id: 850fe162a0a80b5547622f6cc267e66cad3ae4ce
2013-08-10 00:25:47 -07:00
John-David Dalton
186f1cf714 Add _.eachRight alias of _.forEachRight.
Former-commit-id: ff42b599dd22707fe20ab60a7aff47945b5cef73
2013-08-09 23:58:38 -07:00
John-David Dalton
a5cf42b7c8 Ensure modularize underscore exports=amd works without errors in template.js.
Former-commit-id: ae137c924d26b2614ed1ebdb7abb33e4b76124f4
2013-08-09 23:46:20 -07:00
John-David Dalton
fd7dba8860 Fix missing comma.
Former-commit-id: 7c1745b9f3993613ff0e32f574d43c9d78b33c80
2013-08-09 23:12:43 -07:00
John-David Dalton
32d7e365d2 Ensure _.curry test runs with strict builds.
Former-commit-id: 7bb7d8bdb88b49ec1b35fbf9933f43e2fcd61a53
2013-08-09 23:11:50 -07:00
John-David Dalton
1078cc1c91 Add _.debounce var dependency and remove Adobe JS engine cleanup in build.
Former-commit-id: 330e19ecf1a1d33e6207291aa05b103f68541e81
2013-08-09 22:48:44 -07:00
John-David Dalton
c97fc370cd Cleanup compareAscending and createBound.
Former-commit-id: e783a68666aaea16d917fa1db74d2092e5dcaa9a
2013-08-09 22:47:55 -07:00
John-David Dalton
fca8da118e Ensure createBound works with ES5 features removed.
Former-commit-id: 30fd5e615b473c9c9d3c013a4a5d7e1759872ede
2013-08-09 21:23:03 -07:00
John-David Dalton
dda56405e6 Add fallback for Date.now and keep Array#isArray fallback in modern builds.
Former-commit-id: 4c5ca88d73b8624fdebf50b40c0384219008cb7c
2013-08-09 09:26:07 -07:00
John-David Dalton
f0f23d491c Cleanup _.curry.
Former-commit-id: edcc8b2b4c67fa04d8c67e7b7fcdd071c4155e89
2013-08-09 09:08:23 -07:00
John-David Dalton
44c10d720a Use Date.now in modern builds.
Former-commit-id: de4329c5f4eaa92da8447e1232ce28e00a0f885d
2013-08-09 09:01:32 -07:00
John-David Dalton
690e5a7f9c Tweak video link titles in readme. [ci skip]
Former-commit-id: 53330adf487980642cf6fe8c1a8213594731d270
2013-08-09 00:35:27 -07:00
John-David Dalton
e4fdbc3cb4 Add Underscore license url to non-minified copyright header. [ci skip]
Former-commit-id: 32e6b24f284c9492bd81d680818a829eabe9954c
2013-08-09 00:35:04 -07:00
John-David Dalton
fe2b86ba83 Correct removing ES5 features from createBound for non modern builds.
Former-commit-id: 35aacb52d1bfbd18630460f0c8e21e4fd5d716ea
2013-08-09 00:14:39 -07:00
John-David Dalton
8fb9557520 Ensure "Functions" methods throw if not provided a function and remove Adobe JS engine fix from compareAscending for modern builds.
Former-commit-id: 85f2c3579c33440d3f7351f5a0dfb1c09cd0cc7a
2013-08-08 23:39:35 -07:00
John-David Dalton
25c91b398a Fix InDesign bug with _.sortBy.
Former-commit-id: 3ed2c5fcb02885a9b3563cf9081f6e2af8826c6d
2013-08-08 22:23:17 -07:00
John-David Dalton
8a524dd98f Add _.curry.
Former-commit-id: 33282039186323ad4f58d7d7ec19e3c3974dc9b3
2013-08-08 22:11:03 -07:00
John-David Dalton
7371f8927c Have build remove trailing spaces in lines.
Former-commit-id: 580650186c9661b900ebbe846e13ba194fd2c0bc
2013-08-07 22:04:18 -07:00
John-David Dalton
3d4f58d564 Tweak _.remove and _.pull test for phantomjs.
Former-commit-id: ae404a0da2e03636edf0760322330a996b71fc70
2013-08-07 19:28:25 -07:00
John-David Dalton
f0e32c88ec Add _.throttle test.
Former-commit-id: f50fe31ee221d1a3c2835b037b58b13c8afdd70f
2013-08-07 09:19:05 -07:00
John-David Dalton
5ae3eccaf1 Move _.remove to the "Arrays" category and add unit tests.
Former-commit-id: b0542496b45582b8ca59de19e950dc2368deee0a
2013-08-07 08:43:41 -07:00
John-David Dalton
093f12254f Tweak comments and docs. [ci skip]
Former-commit-id: 0aa090919d1566081c90bf7a25c1f6f579a8eec2
2013-08-07 07:58:36 -07:00
John-David Dalton
3a8afe2969 Shorten doc snippet in readme. [ci skip]
Former-commit-id: 1c50d1e818a4765eddfcf51750a7c70a96ac871f
2013-08-06 09:08:13 -07:00
John-David Dalton
fff5ae97f2 Cleanup fix for modularize underscore and _.mixin and add tests for correct indicatorObject use in underscore builds.
Former-commit-id: 7700fb4df90cdc3eca47af037677d71a70908616
2013-08-06 09:07:45 -07:00
John-David Dalton
3c626e3ea5 Cleanup README.md. [ci skip]
Former-commit-id: e63291595bcc925470aa7d4f4889fcfc5c8daf6f
2013-08-06 00:29:54 -07:00
John-David Dalton
26f57141a1 Simplify package.json description.
Former-commit-id: 43470293d97b86435fd897edd34f910f7a435a8d
2013-08-05 22:12:52 -07:00
John-David Dalton
419aa9dcba Add find unit tests.
Former-commit-id: 1dff5e55c73f91b4b877ee8e0cd4ad38655c49fb
2013-08-05 22:11:38 -07:00
John-David Dalton
3f15456b9c Add build tests for findIndex, findKey, findLast, findLastIndex, findLastKey. forEachRight, forInRight, and forOwnRight.
Former-commit-id: c82a2f327efb180ab849794e777da18a4033045e
2013-08-04 13:50:25 -07:00
John-David Dalton
f67a2fa865 Simplify iteratorObject use for underscore builds and make _.mixin and _.template work better for modularize underscore builds.
Former-commit-id: f9fb33faacbcb3e1bc2ece0a3c70496b3fb3f251
2013-08-04 12:47:27 -07:00
John-David Dalton
0f6de542bf Fix _.forEachRight, _.forInRight, and _.findLastIndex and add related unit tests.
Former-commit-id: 5131ae4559cd71d8016745f85158bb6f96426d01
2013-08-04 12:46:27 -07:00
John-David Dalton
1a529841e0 Fix modularize mobile builds.
Former-commit-id: 5ffb5bd761c8e25c2a3bb9643cfa22b8c08bf2b1
2013-08-03 22:23:22 -07:00
John-David Dalton
a9bf6a0e3b Update vendor/benchmark.js and vendor/underscore tests.
Former-commit-id: 28d47ac7efb1af2d23a749ea50178c09edfe62bd
2013-08-03 21:33:58 -07:00
John-David Dalton
76dcd7d96e Fix modularize legacy builds.
Former-commit-id: 17b09cce67bdf0ec2fd7373beb5b58240b08877b
2013-08-03 21:33:29 -07:00
John-David Dalton
6aa1361b1a Add minified modern and underscore builds back to the package.json. [ci skip]
Former-commit-id: f814323f06bdcf8a3043699a1e9b607c81410c9f
2013-08-03 19:39:14 -07:00
John-David Dalton
f623a4ecef Update docs, dist builds, and fix build.
Former-commit-id: 95a2ae15735b2c98f24c20b8dc894c2832ac107b
2013-08-03 19:26:05 -07:00
John-David Dalton
aa465a12aa Cleanup support for a step of 0 in _.range and add unit tests.
Former-commit-id: 383719999d8f4a7e153784aea3b6f4174684dd9a
2013-08-03 15:59:36 -07:00
John-David Dalton
81ba623423 Merge branch 'master' of github.com:bestiejs/lodash
Former-commit-id: cd661a7d7fe08ec324a7dd7b2325e6e58a35b752
2013-08-03 13:32:40 -07:00
John-David Dalton
4f6f6cca0f Replace passed with provided in docs and test descriptions.
Former-commit-id: b47302b804a7e4f89a0dbacfb85d24d80dae81a9
2013-08-03 13:32:32 -07:00
John-David Dalton
56346f2a52 Make tests pass for modularized build and create a working lodash module.
Former-commit-id: 44cbac15f62e4f727ae0eec963cefd2498ee62ca
2013-08-03 13:31:54 -07:00
John-David Dalton
edcd3f5145 Merge pull request #327 from stereokai/master
Enable _.range() to accept a 0 for step.

Former-commit-id: 6a778327f216de6c606ba091312db9f1b8f85c4e
2013-08-03 10:56:29 -07:00
Stereokai
7acd3d5297 Enable _.range() to accept a 0 for step
Enable `_.range()` to accept a `0` for `step`, for initializing arrays such as `[0, 0, 0, 0, 0]`, `[-1, -1, -1, -1, -1]`, useful in many use cases with inconsistent/morphing object arrays.

Former-commit-id: 5a263ec17e454ba38dfa9b6deb913dddccaddfeb
2013-08-03 11:26:44 +03:00
John-David Dalton
1732c16778 Update builds and docs, replacing passed with provided.
Former-commit-id: 30114421fcb5853097c0992cd4125aa25ede6853
2013-08-02 09:01:58 -07:00
John-David Dalton
913d440c61 Rework how "chaining" methods are modularized.
Former-commit-id: 2986db5039ac031d1007c7376a60f41fc3eafece
2013-08-02 00:22:57 -07:00
John-David Dalton
8cdb4d48f2 Fix chain check in test/underscore.html.
Former-commit-id: 39ebd562e1fd08548f778c7f7ddfa3c0885a782e
2013-08-02 00:11:37 -07:00
John-David Dalton
907ac05c00 Fix issues preventing _.mixin from working as a module.
Former-commit-id: 57afac8d0901856aaf67688d46e2649532edeb61
2013-08-01 09:18:31 -07:00
John-David Dalton
067558529c Move more code to be removed before the call to buildModule.
Former-commit-id: 255ba4bf6e65d61378226ba1c13708619ca68941
2013-08-01 09:17:45 -07:00
John-David Dalton
c97e653ba1 Add baseCreateCallback to avoid circular deps add more varDeps to fix large array caching.
Former-commit-id: f8164bbff59a3ad294c5670693942dc56a1c88a5
2013-08-01 00:12:53 -07:00
John-David Dalton
9a935ba90c Avoid tests not relevant to modularized builds when its selected.
Former-commit-id: 3e0e4275cfa51fc12ea9583801459588658de702
2013-07-31 23:58:22 -07:00
John-David Dalton
134ed51517 Make modularized builds tested and avoid errors when running modularized tests.
Former-commit-id: 38aa57ec3d401cb3892093008d75d03545d63c6b
2013-07-31 09:06:29 -07:00
John-David Dalton
993dd84af9 Add dojo amd loader to the list of loaders supported in the readme.
Former-commit-id: 07504c1edeb540aa4103909a69ab83c47b9e7e18
2013-07-30 23:59:40 -07:00
John-David Dalton
28e3ab73fa Add _.remove, _.pull, and fix typos in build. [closes #281]
Former-commit-id: e771f3934c868d0d7093f1690d9c7d57fa75ae89
2013-07-30 23:46:43 -07:00
John-David Dalton
70a5efa1d6 Cleanup build and make legacy command work with modularize.
Former-commit-id: 89cfa2e693bd299096f9418f5cab7f41c37ddf2a
2013-07-30 08:53:56 -07:00
John-David Dalton
a51a355a53 Optimize build for creating modules.
Former-commit-id: 9e06f7c9ec1084bf901123d2ad7d1fd7da2e11fb
2013-07-30 00:02:06 -07:00
John-David Dalton
fdd0a33571 Rebuild docs and dist.
Former-commit-id: ae113f2c04eef7a34b1b49bca3e6dcb7402f723c
2013-07-29 00:26:38 -07:00
John-David Dalton
6547d03b91 Clarify doc example for _.compose.
Former-commit-id: bcd9337d0cc2f7b6a1ca77723f8d20d768cb0b91
2013-07-28 23:47:57 -07:00
John-David Dalton
cc0c2f1b3c Add explicit chaining support to Lo-Dash. [closes #325]
Former-commit-id: 58d01723ddc40f636af9954e5a9f6370e0c88aac
2013-07-28 13:23:04 -07:00
John-David Dalton
c80c59c692 Correct baseClone dependencies and ensure forEachRight isn't exposed in underscore builds.
Former-commit-id: 37bba697b3cdd80405519976a30014efb1336cec
2013-07-28 10:12:32 -07:00
John-David Dalton
10de191dd5 Adjust backbone test html, and adjust underscore html to work with Lo-Dash's tweaked chain behavior.
Former-commit-id: e5042e1c2811004989e57cc1a24f690c3bab1b25
2013-07-28 10:10:28 -07:00
John-David Dalton
1626cec089 Add @type to _.isArray, required for modern builds.
Former-commit-id: 1e1c9f4f47211a767aad873675063c5e2713c144
2013-07-28 10:09:35 -07:00
John-David Dalton
0404776d87 Add _.forEachRight, _.forInRight, _.forOwnRight, _.findLast, _.findLastIndex, and _.findLastKey methods. [closes #309]
Former-commit-id: 7097f79e278bf2dfacfed449ce5f64a2dc19a662
2013-07-27 00:30:54 -07:00
John-David Dalton
4398fca1bd Tweak _.createCallback and Node.js note in readme. [ci skip]
Former-commit-id: a56737d9afe65f8af83abc9c00687709068ad0e0
2013-07-26 19:47:01 -07:00
John-David Dalton
e94ca12f9f Add getObject and releaseObject to setBindData.
Former-commit-id: d4152ccc078bfa64d62640d89b673057cf9f6a19
2013-07-26 19:37:42 -07:00
John-David Dalton
036c2f6a1c Add unit tests for _.countBy, _.groupBy, _.indexBy, and _.sortBy for when a callback is not passed.
Former-commit-id: e3c1760607cb86fc6c3729409d217b4255fb695d
2013-07-26 19:14:13 -07:00
John-David Dalton
611304e257 Update vendor/underscore and add _.indexBy perf and unit tests.
Former-commit-id: 5fc6c853773385aa39d470429899a35f9f17cad8
2013-07-26 09:29:44 -07:00
John-David Dalton
cf26447f7c Add _.indexBy method and add a noop fallback for setBindData.
Former-commit-id: f8035b9a221ba7b625c21cb566c62931877da6ef
2013-07-26 09:12:04 -07:00
John-David Dalton
e5b8e04dde Move Node.js version compat warning note to the Node.js notes section of the readme. [ci skip]
Former-commit-id: 42acc77eb3ced990683e9d91a155e25486dd73c5
2013-07-25 09:26:55 -07:00
John-David Dalton
bb201e6ca4 Reduce npm package size.
Former-commit-id: 29d4eb4f90e2d215b65d04b8c8063804472de8fc
2013-07-25 09:13:57 -07:00
John-David Dalton
bb58d633c0 Fix _.createCallback perf regression.
Former-commit-id: a66821a2c4aa3bae626e19ef638a27689b96dc24
2013-07-25 09:05:43 -07:00
John-David Dalton
56ff8755d4 Update _.createCallback dependencies and fix typo in removeFromCreateIterator.
Former-commit-id: 8478aadcdcb3fbf30a481de1bc515510959a2396
2013-07-24 22:54:55 -07:00
John-David Dalton
57fc027f77 Avoid circular dependencies.
Former-commit-id: a45dd055f44f72797cb62ba040ecc2d45cc24634
2013-07-24 08:27:09 -07:00
John-David Dalton
bdb7c226f1 Update createBound and setBindData variable dependencies.
Former-commit-id: ff0c375fa334e1b54968208c7d311f65a766387f
2013-07-22 21:19:28 -07:00
John-David Dalton
17e32017a7 Allow argCount to be omitted an not default to 3, and cleanup createBound.
Former-commit-id: cbafeaa441aae1ef28268bc2614b1a6e038acfe1
2013-07-22 19:11:44 -07:00
John-David Dalton
2c772d0f4c Ensure build command csp cannot be combined with others like underscore.
Former-commit-id: 97b6bd973323e086f1b6fdf3e40a7732804e2669
2013-07-22 07:16:04 -07:00
John-David Dalton
769ff84a65 Fix typo in _.debounce unit test.
Former-commit-id: b8138dbae144836701e65f98de8981defaaa1a54
2013-07-22 07:12:22 -07:00
John-David Dalton
fd1fbd4843 Remove ES5 optimizations from the compat build.
Former-commit-id: c0d39af98c8b6474d051bcd16a7f5cee1c801477
2013-07-21 23:54:08 -07:00
John-David Dalton
eaa9430e26 Update docs and builds.
Former-commit-id: 27acae75d0412c0e94caa857d861522cbbc6b1a8
2013-07-21 23:50:34 -07:00
John-David Dalton
2e5de88445 Remove hasThis and add comments to createBound and createCallback.
Former-commit-id: cdc9a69dc60913d6c2383053a881453dd2b7b0d5
2013-07-21 23:46:59 -07:00
John-David Dalton
b4b9910203 Add unit tests for createBound and _.createCallback additions.
Former-commit-id: 68ad27523352a7e7b70f026588342fb70318454b
2013-07-21 23:44:38 -07:00
John-David Dalton
afeeadd665 Tweak times in _.debounce and _.throttle unit tests.
Former-commit-id: d079ee2258151e126fd1c40efb9c01ee888170aa
2013-07-21 15:50:50 -07:00
John-David Dalton
fcbeb10159 Cleanup createBound.
Former-commit-id: f16e6df18a036507edea4b64618ffb06f3823a78
2013-07-21 15:27:10 -07:00
John-David Dalton
65227f601e Rename basicXYZ functions to baseXYZ, extract _.clone, _.merge, _.isEqual functions into their own baseXYZ functions, and rework createBound to flatten multiple calls.
Former-commit-id: 8efa6004d747103e9ec6507755fa6ffceb01b16f
2013-07-21 15:24:44 -07:00
John-David Dalton
56ae4dcd12 Clarify _.where docs and cleanup other docs. [ci skip]
Former-commit-id: 1749f85df8c7b21603191e2a249ef31e6df08bd3
2013-07-19 23:56:35 -07:00
John-David Dalton
2b2c8e6b82 Ensure _.zipObject skips falsey elements in a given two dimensional array.
Former-commit-id: 31ce7e65aee98cbed477276ae9115b33fd10c6ea
2013-07-18 09:09:46 -07:00
John-David Dalton
49c032315c Add hasThis to avoid repeatedly checking for this.
Former-commit-id: 15ce8566364ddac60ac01f3a36343c33d9739b77
2013-07-18 08:58:40 -07:00
John-David Dalton
15109f801e Add _.mixin build test.
Former-commit-id: e6fc1d3384519c2678f875b083222c83519f7123
2013-07-18 08:33:59 -07:00
John-David Dalton
3de0a16a9d Add _.where fast path for the common use case or passing an object with one property.
Former-commit-id: dfb78f59ae22f3ccdd88d58cefdb8abcde58eda6
2013-07-18 08:30:05 -07:00
John-David Dalton
bb49b0c16a Allow _.mixin to accept a destination object as well as a source object.
Former-commit-id: 11ccb77653f017270c07579f59d75b847d4e6c65
2013-07-18 08:12:14 -07:00
John-David Dalton
9561414985 Ensure the build removes properties in expressions from createIterator.
Former-commit-id: 6e06397c6dd4e7c550667bc364faad565d0244cd
2013-07-17 08:34:33 -07:00
John-David Dalton
db7354ab72 Add imports option docs to _.template.
Former-commit-id: 4ac5d64b0dae3068d07474beabed7fd5702da9a2
2013-07-17 08:07:46 -07:00
John-David Dalton
34396dbbec Simplify type checks in _.isEqual.
Former-commit-id: a1aeb5aeab6ef30c6f9377f5498da4eb6d112bc3
2013-07-16 23:57:23 -07:00
John-David Dalton
d842a2f62e Allow /test and /perf to change dropdown values if the other dropdown has a custom entry.
Former-commit-id: d56880e7c588b14ae4c65cacc37f042352e5eee1
2013-07-16 23:48:29 -07:00
John-David Dalton
a17c32bed0 Update vendor/requirejs and fix AMD dependencies to avoid circular dependency issues.
Former-commit-id: 4af19b824f7018d7e3473ba7fe98584b5d6949c5
2013-07-16 23:01:52 -07:00
John-David Dalton
fab0b91a79 Update es5.github.com to es5.github.io.
Former-commit-id: 29bafb1c879512e25517524805b3537084d92896
2013-07-16 20:08:23 -07:00
John-David Dalton
88974d552d Add jsDelivr can link to the README.txt. [ci skip] [closes #318]
Former-commit-id: 8b2780fef7eb5a8e63fc0978b66771368663aba5
2013-07-16 19:53:49 -07:00
John-David Dalton
b90a38ce8b Rebuild dist/.
Former-commit-id: d71f105493e9931f95aff890e8efaf480a1ee827
2013-07-16 09:17:40 -07:00
John-David Dalton
b3df27c362 Add note about NaN to _.isNumber docs. [closes #320]
Former-commit-id: 0b6e99297934ef2e2d43eeff676d0d40832d8e67
2013-07-16 09:17:12 -07:00
John-David Dalton
854ea26ab7 Make matchFunction and matchProp ignore leading comments by default, make removeProp remove variable assignments too, and ensure inline require calls have the correct dependency paths.
Former-commit-id: 47e265e550ca863af5902c07df63809f47c1f96d
2013-07-16 09:07:42 -07:00
John-David Dalton
e385b3499b Remove dependencyObject.
Former-commit-id: 374611a2f1180402700fad5ba7f86e390150d37b
2013-07-15 08:20:16 -07:00
John-David Dalton
77d323b38c Fix build.
Former-commit-id: b894b652c8c566411bb47935b67d649a2e6461e7
2013-07-14 19:16:53 -07:00
John-David Dalton
64eeb091b8 Dynamically create absolute path in test runners.
Former-commit-id: b6b7daef445b3750e687b3559966def1f2b165d3
2013-07-14 19:04:40 -07:00
Blaine Bublitz
65f5f8e8e2 use absolute paths for test files
Former-commit-id: 383d797273b168233c5a5653e71c0788e7d7343c
2013-07-14 16:15:51 -07:00
John-David Dalton
6b3ee1aaaf Simplify AMD loader config options.
Former-commit-id: 69a89fe05e45f508fefe445f147da5aa4da8fc7b
2013-07-14 15:38:16 -07:00
Blaine Bublitz
27ca48c6bb use packages instead of path for modularize option
Former-commit-id: 9f8d3cc49fe3f8d21991e48b46845abd9101f171
2013-07-14 13:51:01 -07:00
Blaine Bublitz
2786c776e3 Merge branch 'master' of github.com:bestiejs/lodash
Former-commit-id: 699fbdc06c27cfec9d0f7b9809921f81884948f1
2013-07-14 13:40:43 -07:00
John-David Dalton
23cd5b906b Minify dependencyObject properties correctly.
Former-commit-id: a0d57812420a347938a438d9ecb13467401bcc96
2013-07-14 13:40:17 -07:00
John-David Dalton
0f9d20129d Ensure category modules reference dependencies with relative paths.
Former-commit-id: 5a12a4b2f4cd3a56456238303e7d941b06f76d9f
2013-07-14 13:39:13 -07:00
John-David Dalton
4649bd3906 Ensure category modules reference dependencies with relative paths.
Former-commit-id: 143360f03cc30f759ebd8e5e949b0dd8a1b937b5
2013-07-14 13:10:46 -07:00
John-David Dalton
3048ac2f6d Avoid circular dependency in createCallback and get Curl modularize tests working.
Former-commit-id: cf33217163f2c809fe8ddbb9debd7c95b002b8dc
2013-07-14 12:42:09 -07:00
John-David Dalton
8679377fcf Allow getDependencies and getDependants to be used with Array#map and cleanup expand in build.js.
Former-commit-id: b05ca0cdb9f9b8db4a0503a126e85d902f5bf7b1
2013-07-14 11:46:02 -07:00
John-David Dalton
db5264af3c Recursively add props and vars to include in the build in build.js.
Former-commit-id: fe7b8cad6ee6df1443424e05836e00a81f532af8
2013-07-14 11:25:21 -07:00
John-David Dalton
059fbb9e5d Remove _.unzip use from underscore build tests.
Former-commit-id: ea76623efddc58550f67ee3b40ba93d1b7b8770e
2013-07-14 11:25:21 -07:00
John-David Dalton
01303c1e31 Cleanup argument juggling comments.
Former-commit-id: e4c175791e514e7e8055f39c2156375c2da91bf2
2013-07-14 11:25:12 -07:00
John-David Dalton
a8aaa793a0 Remove unzip from underscore build.
Former-commit-id: 5c1ed2d73e678e3f63c5378e8318508207b01988
2013-07-14 08:05:54 -07:00
John-David Dalton
c5698e82da Track function dependencies of variables in build.js.
Former-commit-id: 127d9c849cb6a77ed2bb192573bc1f8f7f661838
2013-07-14 01:12:18 -07:00
Blaine Bublitz
ec12f7a5e7 Use curl's js! plugin to load test.js since it doesn't have a define in the file.
(cherry picked from commit 078d78a70e664bb92d129791d99b97f48c6ccafc)


Former-commit-id: b684cc6ffad049f32c0f6f9f16511f3242c913a2
2013-07-14 00:25:01 -07:00
John-David Dalton
b87fec554f Ensure underscore builds use basicFlatten.
Former-commit-id: 148f37a27467391e9719fb098acb75ebac256f1b
2013-07-13 23:24:57 -07:00
John-David Dalton
740981376d Fix asyncTests when using an AMD loader.
Former-commit-id: 2a1aa132c9a941205cf495f737f8f9ea2fdc574f
2013-07-13 23:19:25 -07:00
John-David Dalton
8694364aa3 Remove overloadWrapper and ensure Arrays methods work with arguments objects as secondary arguments.
Former-commit-id: 0b5f213947496622e79daea74e525e60ca53e8eb
2013-07-13 18:22:31 -07:00
John-David Dalton
f1b1fee6e4 Remove overloadWrapper and keep basicFlatten and basicUniq in various builds.
Former-commit-id: 3cb08e1232184a1a9737be4d520b15b725f7cedc
2013-07-13 18:21:20 -07:00
John-David Dalton
915596b23e Revert to QUnit v1.10.0 to avoid asyncTest issues.
Former-commit-id: 6127f8d2492eaef6f097d1ec5b25dadbf25e3af9
2013-07-13 18:06:27 -07:00
John-David Dalton
6d65cb77ec Make perf-ui.js and test-ui.js more aligned, remove unzip perf test, and handle comparing to files of the same name in perf.js.
Former-commit-id: 7a5353aab76d6667b6dd5d43e85f95695e5a9cba
2013-07-13 16:39:18 -07:00
John-David Dalton
51e2f8e49b Add unit tests to ensure methods accept falsey arguments and arguments objects.
Former-commit-id: 72dac914c33ad2270deeeffb01c94e5dd00662c6
2013-07-13 16:37:53 -07:00
John-David Dalton
0a7fc356b6 Ensure underscore build versions of _.where and _.findWhere align with Underscore 1.5.
Former-commit-id: 49653c65a29c5a9108630a38b80848b2e5596079
2013-07-13 10:37:28 -07:00
John-David Dalton
ff0f05a1c1 Ensure more Arrays methods accept arguments objects and allow falsey arguments.
Former-commit-id: 06dfbb25236c6daf3efc6b0c1d06d00cf17180b8
2013-07-13 10:35:05 -07:00
John-David Dalton
0ea9362d06 Update vendor/underscore to v1.5.1 and update copyrights and tested environments.
Former-commit-id: 3bdfb1de97d08d05199f5f97c9c3145d7068e7fd
2013-07-09 23:57:54 -07:00
John-David Dalton
9d3932bd82 Cleanup getVars, matchFunction, and matchVar.
Former-commit-id: b06d258373912d75bdfbbb31707fa17c160f75fe
2013-07-09 22:38:31 -07:00
John-David Dalton
8c787fa7f7 Fix failing build tests.
Former-commit-id: b3e1f62389f2406b07bb5db5551698ac58e5e8b9
2013-07-09 09:21:44 -07:00
John-David Dalton
2508e71324 Avoid maintaining the html escape/unescape regexes independently of the entity maps.
Former-commit-id: 847e58befee7641bc39af37bde12fc99da9edb28
2013-07-09 09:04:44 -07:00
John-David Dalton
b2f4f96ef9 Make split regexes in matchVar and matchFunction into multiples, correct typo in getDependants, and remove a lot of edge case build code.
Former-commit-id: 65917a2a0acd7c3502e04e583834f3f10efd15f7
2013-07-09 09:00:53 -07:00
John-David Dalton
fdae297fca Rename isLodashFunc to isLodash in build.js.
Former-commit-id: 4e7ae65eeba640e095aeaf92c2f36cc70ca783c2
2013-07-08 08:34:15 -07:00
John-David Dalton
36488fd836 Simplify _.zip for the underscore build.
Former-commit-id: 18560e78f052fad5c5d7af1ef6571dd31accf690
2013-07-08 08:29:18 -07:00
John-David Dalton
ee01c944b4 Move phantom checks in test.'s to the document variable assignment.
Former-commit-id: 04a4c99398401d1d69236daa5eb0290db23a07d2
2013-07-08 08:07:40 -07:00
John-David Dalton
d7f4f392d2 Fix avoid hang in web worker unit test for phantomjs.
Former-commit-id: 22b4e7c99f9b0eb3cf7c250144bb375aeb9352e8
2013-07-08 01:16:01 -07:00
John-David Dalton
1756093618 Fix minified builds.
Former-commit-id: 11f14c02cca1b5df2fbbce49f7ceff8cf25ffe65
2013-07-08 01:11:05 -07:00
John-David Dalton
1734c6e6bf Make test/underscore.html support the modularize option and cleanup test/index.html.
Former-commit-id: 98ab3a50a58f27508208655a983a9cd96d99f965
2013-07-08 00:05:00 -07:00
John-David Dalton
839f345fa3 Cleanup web worker unit test.
Former-commit-id: a6b2f450f26eba8cb233cceb5920e7ee69c665f1
2013-07-08 00:03:53 -07:00
John-David Dalton
d69b5385e4 Cleanup test/test-ui.js and perf/perf-ui.js.
Former-commit-id: b511f9f0732dffb2339f7284b913d699c11ce9c0
2013-07-08 00:03:13 -07:00
John-David Dalton
eb6b5755e7 Add web worker unit test. [closes #313]
Former-commit-id: 77d0b907a5ae58ff3f4da8b54196b12949a4efd4
2013-07-07 23:24:17 -07:00
John-David Dalton
9c65d9f957 Remove buggy Node .js v0.8 from .travis.yml.
Former-commit-id: 5937b84fdc0297c9a50c13e71948a76044319ec5
2013-07-07 18:37:22 -07:00
John-David Dalton
cfa187f7d9 Create a /lodash.js module when using modularize.
Former-commit-id: f2d1222fb9ccaed019a712448c2144c90327a4f0
2013-07-07 17:29:54 -07:00
John-David Dalton
30d0fbeae6 Make modularized builds work in the unit test.
Former-commit-id: 2d56960e70a2f8c16087cc88c66008e766ea8338
2013-07-07 17:09:47 -07:00
John-David Dalton
9b21656314 Allow switching the module loader in the unit tests.
Former-commit-id: 8521e92925cbca8ff73adf3f1a350caa662e27f7
2013-07-07 16:24:26 -07:00
John-David Dalton
b1b06a38af Rebuild docs and dist.
Former-commit-id: fdba90c6b602eef0c36190e889ebc3fb2ec6c622
2013-07-07 15:18:26 -07:00
John-David Dalton
d2fffe5b88 Make _.unzip and alias of _.zip.
Former-commit-id: fca00001ad850c250f9883572c4dce7b41dde88d
2013-07-07 15:11:19 -07:00
John-David Dalton
09d560888e Update tested browsers and add a note about the Node.js REPL to the README.md. [closes #312]
Former-commit-id: c04331d53aeb3af4d859ce7d4120871bfdd55b73
2013-07-07 14:12:58 -07:00
John-David Dalton
fa28326ed6 Fix build.
Former-commit-id: decaceb4a40033dcd02ed9018fccb2bea1332e79
2013-07-07 14:01:28 -07:00
John-David Dalton
9ea4a6b7b6 Ensure compiled templates work with exports=node.
Former-commit-id: bf235dfecf8599022b7332d4d010c6f3a52c5c26
2013-07-07 01:31:19 -07:00
John-David Dalton
ffa6fafcc1 Fix typo of matchProp to matchVar in build.js.
Former-commit-id: d42933a19b7c90dd7b007858ec73b8f7b2f64572
2013-07-06 20:17:48 -07:00
John-David Dalton
4be5b80ff6 Quote Node.js versions in travis.yml
Former-commit-id: 57127e5f9c476d7e174d56d2704ee09a90984c33
2013-07-06 20:10:46 -07:00
John-David Dalton
5028b07aaa Update builds and docs.
Former-commit-id: e66c5377ffb5c03191673004bb82781a0562535a
2013-07-06 20:08:41 -07:00
John-David Dalton
7ce5dcdead Cleanup matchProp and removeProp in build.js.
Former-commit-id: b30044f7c9ff0d87098d6404341a42d66f51173a
2013-07-06 20:06:14 -07:00
John-David Dalton
7d8571b0e1 Update vendor/underscore to v1.5.0.
Former-commit-id: 8f647bccfdd8fe81473ae7d1354056a928b6f28c
2013-07-06 18:33:44 -07:00
John-David Dalton
fca2fe2c8a Update dependencies and make the underscore build pass more Underscore v1.5.0 unit tests.
Former-commit-id: 31807c11024b44238fcca5ad1682790510371896
2013-07-06 18:33:02 -07:00
John-David Dalton
75576577e0 Update _.after to be in sync with Underscore v1.5.0.
Former-commit-id: d50446cb946a453c081cadff0b0a6245bc45eec4
2013-07-06 14:48:24 -07:00
John-David Dalton
eafc46f6c4 Update underscore build _.defaults and _.result to match Underscore v1.5.0.
Former-commit-id: 12f1ed2217b6d9c845a1be0acd7b8337be94f63f
2013-07-06 14:43:38 -07:00
John-David Dalton
c0c36d3338 Adjust method dependencies for _.flatten, _.uniq, and _.union.
Former-commit-id: f742abfbd9d0c63b16a4f7d3a903ae53d2b7a1fe
2013-07-06 14:40:14 -07:00
John-David Dalton
6a73b0820e Ensure _.flatten will flatten arguments objects.
Former-commit-id: 9ea8e40ff85b217a6497c9bbf91c9640211d9477
2013-07-06 13:48:27 -07:00
John-David Dalton
bcb5eda7d8 Optimize _.isArguments and cleanup _.isArray and _.isRegExp.
Former-commit-id: 2ce67cedca1e2b21e206c4822126b86304c8dd5f
2013-07-06 13:47:11 -07:00
John-David Dalton
2c833b5028 Bump tested Node.js version to 0.10.12 in README.md. [ci skip]
Former-commit-id: d272e4a61375f91a18531b4537be1be4ab06fc63
2013-07-04 01:56:00 -07:00
John-David Dalton
6821603980 Add vendor/curl and vendor/dojo to .npmignore.
Former-commit-id: 33ff633f4df0e4fa373820ac8e5ec3999000dfc2
2013-07-04 01:55:02 -07:00
John-David Dalton
8bec45cd58 Use QUnit v1.11.0 instead of v1.12.0 for non-browser support.
Former-commit-id: 5e554308840a9d29b6354421af73906c59d8f61d
2013-07-04 01:51:28 -07:00
John-David Dalton
ce0f44fb47 Add templateSettings to funcDependencyMap, add reNative to varDependencyMap, and simplify support property cleanup.
Former-commit-id: 0c55084b4479bb8213a3387fc246f36ca3f185dd
2013-07-04 01:18:05 -07:00
John-David Dalton
c740562dd8 Make modularized paths relative and always include a dependency array, even if it's empty.
Former-commit-id: 8f5edb85f01b472b6cc705da6e292d760d3ab12a
2013-07-03 23:53:16 -07:00
John-David Dalton
63a1c8b63e Update vendors, builds, and docs.
Former-commit-id: 08cad493d719ec3ebaa85e0ff279c49f1e2b3655
2013-07-03 23:14:06 -07:00
John-David Dalton
112cdb4842 Use # instead of @ for sourceURLs and sourceMappingURLs.
Former-commit-id: ba78f92591c0cf28dba4c7a93a49f6e0f7ebb305
2013-07-03 00:13:17 -07:00
John-David Dalton
2d5f045c29 Add build tests for build command checks.
Former-commit-id: 3f43b83f07ded116e0ae667f9c809bd1b7b4f30a
2013-07-02 23:40:35 -07:00
John-David Dalton
c43ff29f5d Make node path match in build.js and build/minify.js case-insensitive. [closes #310]
Former-commit-id: 38c00a319ec069efa56b5f22153f98cda09c857e
2013-07-02 22:06:37 -07:00
John-David Dalton
4c0e3c4db9 Remove trailing comma from varDependencyMap.
Former-commit-id: e4f622e116c217eb98fb417d7b1770b88a95cb0d
2013-07-02 08:24:01 -07:00
John-David Dalton
7995a57f77 Move support object cleanup after unused variable cleanup in build.js.
Former-commit-id: 5a334f66f6cb4b5f5fba77148ddc0406e1118f08
2013-07-01 23:17:17 -07:00
John-David Dalton
0a47378f7f Simplify dependency map modifications, and fix typos in getIndexOf replacements.
Former-commit-id: 4066c6950ac6d73b579d0f3f83dfc06f03cc98c9
2013-07-01 22:45:56 -07:00
John-David Dalton
8e9a244cdd Simplify createCache bailout.
Former-commit-id: 2d72da41abfd2bf83017534d841444d99b47776b
2013-07-01 22:44:21 -07:00
John-David Dalton
5f1a4ea08d Fix build.
Former-commit-id: e936444a8db7c16fd4cc456e5d8f9fbadf935ad1
2013-07-01 09:00:21 -07:00
John-David Dalton
034b19d85d Add .html and .md to .gitattributes.
Former-commit-id: 338788296b7b00ae00657bc4d2e522d5989d075c
2013-07-01 08:35:24 -07:00
John-David Dalton
68cb7ea471 Add createCallback to more method dependencies in build.js.
Former-commit-id: 133abccabac9f64bf3bde7e9340e5d2f11638f55
2013-07-01 00:58:43 -07:00
John-David Dalton
d9a3ba0dd1 Add objectTypes to varDependencyMap.defer in build.js.
Former-commit-id: 5f153ba0009ebcb2e0eb7e061228807a0dd3c2bd
2013-07-01 00:13:13 -07:00
John-David Dalton
663e1d8336 Add buildModule to build.js.
Former-commit-id: c301f38ab0aa2343baefed3206e2a9e4491baa60
2013-07-01 00:10:55 -07:00
John-David Dalton
31332f4f53 Add "modularize" to .ignore files.
Former-commit-id: de8d6e65e7aa0de9385c82c9132e03ce2efb7715
2013-06-30 23:56:44 -07:00
John-David Dalton
cb7163dd19 Move snippets and adjust code to make modularize work.
Former-commit-id: 9b0ebc2bca42777f8eab1026c93ece3fb2d8deb6
2013-06-30 22:12:08 -07:00
John-David Dalton
946029a3f7 Cleanup getCategory, add removeProp, remove removeTemplateSettings, rename getMethodsByCategory to getNamesByCategory.
Former-commit-id: 290525ce178f67235683efd70a779aec62a08c71
2013-06-30 21:58:01 -07:00
John-David Dalton
69cbb6e109 Add templateSettings to the Chaining category and cleanup _.difference use.
Former-commit-id: acccb5d3868cf6e38b9f6f87b6107cf4c7b1ec30
2013-06-30 21:39:50 -07:00
John-David Dalton
6054f6bfe1 Add includeProps and includeVars to build.js.
Former-commit-id: 6ea8c0ea3f072393cdba80662c580c489547a29d
2013-06-30 14:52:33 -07:00
John-David Dalton
ae7b9f5fcb Fix incorrectly changed methodName vars in build.js.
Former-commit-id: 73ca6e2241cda5051e752b238a74c75d9c2f8409
2013-06-30 14:51:57 -07:00
John-David Dalton
68dc6b9527 Make the build warn if attempting to combine template with other commands.
Former-commit-id: be47695b4f5315725b6e5520c6ccf3544c220d3a
2013-06-30 14:33:36 -07:00
John-David Dalton
292cdfd5a0 Rename addChainFuncs to addUnderscoreChaining in build.js.
Former-commit-id: a332651048424c6332a2d170435298a1772f9cb0
2013-06-30 14:32:46 -07:00
John-David Dalton
28e2dee605 Fix legacy build.
Former-commit-id: 66bb2736adf06ff03b747369e83c508d90cca60e
2013-06-30 14:31:27 -07:00
John-David Dalton
6d79ab2552 Correct use of function and method terms in build/tests.
Former-commit-id: be0ff50ce30925313716acf15470bd0fa480f6a4
2013-06-30 14:08:55 -07:00
John-David Dalton
da17e424ea Reduce nested code where possible in build.js.
Former-commit-id: 6604a798be84656158957cca0697a208f97ca4f4
2013-06-30 13:17:57 -07:00
John-David Dalton
028c25afd3 Ensure iteratorObject.keys is minified.
Former-commit-id: dcbd40ddcb54c6845fd5255f2ee8c4508091aafd
2013-06-30 11:03:26 -07:00
John-David Dalton
9c2151dc37 Update builds and docs.
Former-commit-id: a09de289c420b76f68efb9471e6e630d07663733
2013-06-30 11:03:07 -07:00
John-David Dalton
9e9bd16b18 Remove varMethodDependencyMap from build.js.
Former-commit-id: fa032025e6c3b6fed18f72bf3cc6ba8ff58cff43
2013-06-30 10:54:09 -07:00
John-David Dalton
3f138aec22 Add getTemplateSettings, removeTemplateSettings, and removeGetIndexOf to build.js.
Former-commit-id: c22a41e98a84b1739696776e40ba66a63f267159
2013-06-30 10:53:26 -07:00
John-David Dalton
e9f66e7c89 Remove getIteratorTemplate from build.js.
Former-commit-id: 1cb26327628839f11cc07ad1fa1f9420fde38209
2013-06-30 10:52:00 -07:00
John-David Dalton
6be64b363c Make getFunctionSource support number values for indent in build.js.
Former-commit-id: 5f977d8058f6773fdffa09f01a59135e9ea3337a
2013-06-30 10:49:55 -07:00
John-David Dalton
51230f21f5 Adjust varMethodDependencyMap when isModularize and remove lodash references when isNoDep.
Former-commit-id: ec7e8dcaec7ba6b09904f5d9a6039c8a572c1f76
2013-06-30 00:30:48 -07:00
John-David Dalton
e12540ba66 Allow the iife command to not have %output% specified.
Former-commit-id: c11cd1d33479e64a689a2412c764be15a807c9ae
2013-06-30 00:29:03 -07:00
John-David Dalton
a6b1bee2af Add includeVars and allow include=none in build.js.
Former-commit-id: 7a77e5ea2920c930eb4ca1fee18661819e366282
2013-06-30 00:27:45 -07:00
John-David Dalton
6187cdafe3 Remove exports comment when removing the _ exports via removeRunInContext in build.js
Former-commit-id: 90460080310f890b707eaa848146de8a26d6765b
2013-06-30 00:26:20 -07:00
John-David Dalton
880f785d04 Add removeAssignments and the snippet that removes methods in build.js.
Former-commit-id: 873a147f2fcb8a0ab19a7980644b1f542bab9b8b
2013-06-30 00:23:02 -07:00
John-David Dalton
5aedcfd6a7 Cleanup build.js.
Former-commit-id: 37a2961136788c9b50d26ed2ce38b208bbf1f40d
2013-06-30 00:20:40 -07:00
John-David Dalton
6ff1a2c236 Remove getCategoryDependencies, getSupport, removeSupport functions from build.js.
Former-commit-id: b55fb46631bb94ffbe986a031d09bf7aefc6ba99
2013-06-30 00:17:20 -07:00
John-David Dalton
317f888383 Make cleanupSource remove extra trailing whitespace.
Former-commit-id: 4b805471336e3259b45a51e1a5f1bea62d66bd94
2013-06-30 00:13:33 -07:00
John-David Dalton
33f1f9abde Update dependencies in build.js.
Former-commit-id: 0de152de0dba9b3349d9234b066a5eb8b7964693
2013-06-30 00:11:36 -07:00
John-David Dalton
913406b568 Make lodash work with modules by avoiding circular dependencies.
Former-commit-id: 57161fd81b837db22fcfe1d318e220f6ca4b1e21
2013-06-29 22:12:12 -07:00
John-David Dalton
6a74d102a4 Add matchVar to build.js.
Former-commit-id: a72f6fa81c9b7f862dc023efe8bd15ed3c2ba0ce
2013-06-28 23:27:43 -07:00
John-David Dalton
e9e36cebcb Add complexVars array, correct removeStrings, and cleanup isVarUsed in build.js.
Former-commit-id: 4d2c65fbad7659fe54c76127b9e9c0bb5731cf35
2013-06-28 09:06:29 -07:00
John-David Dalton
af6bf7a232 Add categoryMap and cleanup buildTemplate, getCategoryDependencies, getCategory, getMethodsByCategory in build.js.
Former-commit-id: e68269afcf6558aefa4a4bba3b75ebf5904714fd
2013-06-25 23:52:05 -07:00
John-David Dalton
5720a7a5e3 Add _.debounce maxWait doc example. [closes #298]
Former-commit-id: c9193ce30fa7c572594b80eeb0a068b73da0affa
2013-06-25 09:07:59 -07:00
John-David Dalton
449c946423 Fix how method names are resolved from categories in test/test-build.js.
Former-commit-id: bbb8a2ca376a64b2fd9c3e2fbe0d3911a7089a94
2013-06-24 08:01:19 -07:00
John-David Dalton
54a2a0da48 Use _.difference instead of _.without.apply(_, …) in test and build files.
Former-commit-id: 5646e8c3e895ea0662df81e7c77e70cdfe2c3a6d
2013-06-23 22:34:05 -07:00
John-David Dalton
e209fedb27 Fix typos in build.js and ensure build tests pass.
Former-commit-id: 4c82850ce314e5a7072f90267c755d991f893442
2013-06-23 19:33:45 -07:00
John-David Dalton
12494f3008 Fix typo in build.js.
Former-commit-id: 6722b5f9905108bdc25b12c857d1f0e4f47c2f7a
2013-06-23 17:23:22 -07:00
John-David Dalton
7f60b46488 Cleanup and fix typos in build tests.
Former-commit-id: cee0620f7cc624bad85c020a39108111bcb16ac2
2013-06-23 17:12:55 -07:00
John-David Dalton
1c9ecd96d4 Correct how categories are parsed in build commands.
Former-commit-id: 93dfd04296f163be7e6099e54931f52ec1ad5391
2013-06-23 17:12:30 -07:00
John-David Dalton
1f84803b91 Fix typo in build.js.
Former-commit-id: d5710a62297b824465f29a43c28882865beec971
2013-06-23 13:36:47 -07:00
John-David Dalton
3f6116f28f Add underscore build test for lack of AMD support.
Former-commit-id: ac1412ff63160d94fa80b982652ba4e10ac894fb
2013-06-23 13:25:48 -07:00
John-David Dalton
4ea0eb94d4 Add warnings to build.js for passing invalid method names to include, minus, and plus.
Former-commit-id: 918ecc8818874b59a292e913a4b8c62d34824f4c
2013-06-23 13:24:49 -07:00
John-David Dalton
e222bc631a Fix failing build tests.
Former-commit-id: c4673ee77f6750500e0f0a1adaf359108db89932
2013-06-23 01:06:34 -07:00
John-David Dalton
9c07c7fe4f Track invalid arguments better in build.js. [closes #303]
Former-commit-id: 7f50c73c8235a5f501bd8292ef59b644f6264e23
2013-06-22 18:06:20 -07:00
John-David Dalton
35d74e18de Add removeNonEnumProps to build.js.
Former-commit-id: d8c544d06fb23d0188c9670b5c0b2cf34e854254
2013-06-22 14:51:04 -07:00
John-David Dalton
266be2c25f Add removeSpliceObjectsFix to build.js.
Former-commit-id: efa1a3882849d2eb2eb01adaf03a1edca201f76e
2013-06-22 09:20:46 -07:00
John-David Dalton
b7cb090144 Correct regexp in build/pre-compile.js that matches string literals.
Former-commit-id: 0ae905b74103df321f997e1d83ac5ce54a17e552
2013-06-22 00:05:37 -07:00
John-David Dalton
30e257bc2b Add removeStrings and remove methods after inlining in build.js.
Former-commit-id: 2b57c9477e08fa89dcc9f567fe8bc64ab4541c4d
2013-06-22 00:05:05 -07:00
John-David Dalton
fbd5679fb1 Better distinguish between \n and \\ in build\pre-compile.js.
Former-commit-id: 8e32e4824a0780dcdd97e81f553df37a701e8d5d
2013-06-21 23:33:18 -07:00
John-David Dalton
9db7234f24 Add propDependencyMapBackup, make getDependants recursive, allow getMethodAssignments to still match lodash.VERSION if all other assignments are removed, and reduce removeFunction calls.
Former-commit-id: d5f3315e2908bbb6a98caf658db0c28066916deb
2013-06-21 22:25:31 -07:00
John-David Dalton
220b2dc912 Update dependencies, rename removePseudoPrivate to removePseudoPrivates, and optimize how dead variables are removed in build.js.
Former-commit-id: e80616a6caa148c954dab611ddde0fc7f5b22cde
2013-06-21 20:24:24 -07:00
John-David Dalton
83c2420038 Add defaultBuildCallback to build.js.
Former-commit-id: a7823682374b90bef1ea4f34bed883318fe48ca2
2013-06-20 00:42:15 -07:00
John-David Dalton
73913f450b Make removeVar punt to removeSupport when removing the support variable.
Former-commit-id: 8a961673173f60669282a7ebb9ad142e13af078e
2013-06-20 00:08:45 -07:00
John-David Dalton
bb966e7e6f Rename useLodashMethod to isLodashMethod, add isExcluded and remove isRemoved from build.js.
Former-commit-id: 59c2756e728f45240db30997350e5bd6db592908
2013-06-19 09:05:42 -07:00
John-David Dalton
b4adc127a4 Simplify getMethodAssignments, add removeMethodAssignments, and avoid some cleanup when the --no-dep flag is passed in build.js.
Former-commit-id: aebfc41fdde98df243c4620ee729977775cba52b
2013-06-19 09:01:42 -07:00
John-David Dalton
2bc343b524 Add defer to the remove forks check in build.js.
Former-commit-id: 964ffc9af09e24b3a9fb3bdc84ff4495521bcd59
2013-06-18 09:04:45 -07:00
John-David Dalton
1f4d6eb0df Remove local clearTimeout and setTimeout vars from the underscore build.
Former-commit-id: d783c0a387ad96b14db718da04dec43056452042
2013-06-18 08:59:58 -07:00
John-David Dalton
ee936fe1a1 Add isShallow to getVars in build.js.
Former-commit-id: c863a26a1e43e4ab8b0d4d84ecea78653663660e
2013-06-18 08:33:42 -07:00
John-David Dalton
f6d9239b37 Rename fallback to fork in build.js.
Former-commit-id: f98efe8f0cc3c5440c05ff8fe31cacb742fdddf3
2013-06-18 08:26:46 -07:00
John-David Dalton
512e5b0240 Add removeComments, removePseudoPrivate, and track more private properties and other dependencies in build.js.
Former-commit-id: 66a9d849080d20549bbdfda7965db1b31ac5388c
2013-06-17 23:30:53 -07:00
John-David Dalton
600148f501 Track property dependencies in build.js.
Former-commit-id: 9ae72c4677f7340e53350702391aa46c328ab81c
2013-06-16 20:20:51 -07:00
John-David Dalton
8791a4f696 Fix build by not counting pseudo private props as part of the isVarUsed result and accounting for findWhere.
Former-commit-id: 974c3a31de0222b9239be0a5a9c4a7b5c5e41913
2013-06-16 19:09:50 -07:00
John-David Dalton
ef40a8a925 Reduce the snippet returned from getMethodAssignments and avoid a possible infinite loop when removing dead vars.
Former-commit-id: 06b49c9ecdf0b279f7d81274d82a813488e9dd26
2013-06-16 17:48:15 -07:00
John-David Dalton
2473e87947 Track less variables and optimize dead variable removal in build.js.
Former-commit-id: 926dae3b46fd491634559391c888fca8a83c84ac
2013-06-16 14:32:52 -07:00
John-David Dalton
bbe1dfb53d Update builds with more dead code removed.
Former-commit-id: 4e1932fcfc89725071a107dcd1aeec2d025b580a
2013-06-16 10:25:35 -07:00
John-David Dalton
3bc27b1a02 Allow findWhere to be included as a lodash method in test-build.js.
Former-commit-id: b69a12bac6a1a91716e4665dad39cafbaa8f88c8
2013-06-16 10:24:12 -07:00
John-David Dalton
ec4c6e140b Correct getVars filter in build.js
Former-commit-id: 4be03b389d54ec360e56918c4d4ca2ad26f46f8a
2013-06-16 10:23:39 -07:00
John-David Dalton
545cc1074c Exclude Lo-Dash methods from getVars results and correct varMap check.
Former-commit-id: 793bc5294ada8f765928aa9e78e83bc535eb44df
2013-06-16 00:59:04 -07:00
John-David Dalton
9c0f4822bc Make build allow iife with newlines and remove isNode from builds that don't need it.
Former-commit-id: 2c0f123d80ea63fb6072d1c02762edd56892d056
2013-06-16 00:05:21 -07:00
John-David Dalton
5040ec109b Make build.js automatically remove unused variables from builds.
Former-commit-id: 03c9e77498263da0f5dc10bc9076a74d471d93f9
2013-06-16 00:04:02 -07:00
John-David Dalton
25b216d7ef Add note about Node.js bug #5688. [closes #301]
Former-commit-id: e2f178fed72f4932ee7b20d3b81974180683a334
2013-06-15 17:17:59 -07:00
John-David Dalton
e475c847d7 Update docdown.
Former-commit-id: 425bcffea78c4c0f1b2004415a0c01f20bcc52c2
2013-06-15 17:02:43 -07:00
John-David Dalton
e7c55c1ad6 Minor whitespace nits.
Former-commit-id: 53a50cbb83cd638f42c0b943c8c2eb354403c787
2013-06-15 17:02:30 -07:00
John-David Dalton
cd8fcadd29 Add *.min.* to ignore files.
Former-commit-id: 6dfd90814ef66ff6a81ff039c5650e7befb735f9
2013-06-15 16:56:15 -07:00
John-David Dalton
f78b6b30d9 Remove testing Node 0.9 in .travis.yml.
Former-commit-id: dcb53274a2d671b3645b1b740533cfc5e0c3cb14
2013-06-14 07:50:57 -07:00
John-David Dalton
cc6a991464 Add changelog note about --output. [ci skip]
Former-commit-id: 7ea8bf69eea43fc489a6f6fe1f18eba206a735de
2013-06-12 23:10:53 -07:00
John-David Dalton
81d487dd89 Update package.json to more closely follow npm docs. [ci skip]
Former-commit-id: 8f5687e779626502da3edcbbe092f4ca93b0cffd
2013-06-12 22:52:22 -07:00
John-David Dalton
af2795c07f Add Dojo builder check to test/test-build.js.
Former-commit-id: 20385525751c6be545d33e46fd650731eebb5246
2013-06-12 08:54:46 -07:00
John-David Dalton
178d9fb8d5 Cleanup _.random unit test.
Former-commit-id: adc32aa17c4375446f180cf6f9daff2eb13b841e
2013-06-12 08:00:33 -07:00
John-David Dalton
9bd12eb782 Bump to v1.3.1.
Former-commit-id: 2d7b1adacb8d2dd6fbee4b9b623b73aa8582e487
2013-06-12 07:54:39 -07:00
John-David Dalton
ef66650997 Ensure maxWait tests pass in Ringo.
Former-commit-id: 57f4142caab308b2df0c0403cfac15cd240c0538
2013-06-12 07:47:53 -07:00
John-David Dalton
fcffcdde1b Increase maxPoolSize limit, add missing cache property to the object returned by getObject, and optimize releaseArray and releaseObject.
Former-commit-id: 41c356fb0d03339bc450de8d69f8002aa4613628
2013-06-12 07:20:58 -07:00
John-David Dalton
7de892ccac Correct typo in _.indexOf perf test.
Former-commit-id: 96d717dbf50ea5b9c8098ec39f2572cccb72ab18
2013-06-12 00:15:14 -07:00
John-David Dalton
f90f2e051a Bump to v1.3.0.
Former-commit-id: 4b8a4e90b97d2960445073cd4288af19dadc9266
2013-06-11 08:33:35 -07:00
John-David Dalton
24f49c8d83 Ensure _.throttle passes underscore unit tests in all environments.
Former-commit-id: 5867875313995ed02a94cd879d537c295b8a5c5f
2013-06-11 08:19:54 -07:00
John-David Dalton
a4ebaf15ab Remove lodash.js from .npmignore.
Former-commit-id: 437fe2fa2e19d4de8f83e2f760cf9da854ded128
2013-06-10 23:55:13 -07:00
John-David Dalton
54a46dccc3 Correct _.throttle method dependencies.
Former-commit-id: 2118e1789803a042675fcc8acb19f1904a102578
2013-06-10 12:37:24 -07:00
John-David Dalton
9747d5057d Update builds and docs.
Former-commit-id: 413e8a906dee3407baf848c4607d9887f57fac85
2013-06-10 11:55:51 -07:00
John-David Dalton
7f5c97d0be Avoid Array.prototype issues in Narwhal.
Former-commit-id: 47627a187d59fb83f4a5b84b03158432d5216395
2013-06-10 11:54:09 -07:00
John-David Dalton
1933a76631 Add maxWait option to _.debounce and implement _.throttle by way of _.debounce. [closes #285]
Former-commit-id: 63b41aac298e5fa89f7922e84b2ed0d5c6545bd3
2013-06-10 11:16:14 -07:00
John-David Dalton
c20d7f9754 Tweak free variable module detection so it will work with Component's polyfill. [closes #296]
Former-commit-id: bda6c962dc5e8299689e4c5cf003f6a6c9a4369d
2013-06-10 09:32:33 -07:00
John-David Dalton
6b46dc7e89 Ensure more private properties are minified correctly.
Former-commit-id: dbebbb088768f04a8252029ad709bad9f01c88bb
2013-06-09 17:21:50 -07:00
John-David Dalton
0c1a26170c Remove build source ./lodash.js from components.
Former-commit-id: 4d7f56385b288b396182020aed07eec285c37815
2013-06-08 09:23:20 -07:00
John-David Dalton
244ee08d7d Remove ./ path prefix to avoid issues with Component's build. [closes #294]
Former-commit-id: 93ba9214538b0f30fde75bff96b75c83f3b96f1f
2013-06-07 18:44:15 -07:00
John-David Dalton
a3acbca24b Rename typod test/run-test.sh.
Former-commit-id: bb982a51c5ceb123e83d98c3201e969607f990b8
2013-06-07 13:33:12 -07:00
John-David Dalton
d77e4ed581 Rebuild files and docs.
Former-commit-id: 1e3b1e236e15e4248247a4b20288ab2e153ce753
2013-06-07 08:39:08 -07:00
John-David Dalton
b928abb956 Tweak _.intersection to still hit fast paths in engines.
Former-commit-id: e8cb944bd6223bb30d58da343c4b5a3f296a4956
2013-06-07 08:24:30 -07:00
John-David Dalton
a46ef8d1a6 When chaining, _.max and _.min should resolve the correct value when passed an array containing only one value. [closes #292]
Former-commit-id: 79c71c1851a73c23919a28aadd56490ded91166c
2013-06-06 09:07:14 -07:00
John-David Dalton
a5d459749f Update dependency maps and remove properties in pre-compile.js that no longer exist.
Former-commit-id: d24f0ac4575ab1c2d12f3e8b4bc5f089424407ca
2013-06-06 08:44:20 -07:00
John-David Dalton
7dfa383968 Move some functions out of runInContext and cleanup _.intersection.
Former-commit-id: dfefa6e202b3cd5a7925ddef6ac73dcab5bef8d1
2013-06-06 08:43:24 -07:00
John-David Dalton
036483d195 Simplify the object pool and large array cache.
Former-commit-id: d15df51efe575cd6fa773622f135ccfb6f675545
2013-06-05 08:06:05 -07:00
John-David Dalton
2c950f74bc Remove props related to _.sortBy if the method isn't included in a given build.
Former-commit-id: b3da4dab8257b9001b7458263a28bf22b0a2c831
2013-06-04 09:12:11 -07:00
John-David Dalton
2c59dcd929 Rebuild docs and files.
Former-commit-id: 94d3e29ccf0ba47599a9d662e5d4068713009c9b
2013-06-04 08:37:12 -07:00
John-David Dalton
658d14f31d Cleanup var names and properties.
Former-commit-id: a3455f40184b61a7abe3f5749ea1c0a141c0e574
2013-06-04 08:36:45 -07:00
John-David Dalton
819f4d2151 Add maxPoolSize to limit array and object pools.
Former-commit-id: 677cdb053c7ef60274d71d9ecf4d6f866ef6a8eb
2013-06-03 08:43:04 -07:00
John-David Dalton
9b214d75df Update DocDown.
Former-commit-id: ecb4c7428007bfb6b721000c81254a03c826b1ff
2013-06-03 08:00:46 -07:00
John-David Dalton
e0891a2d71 Clarify lodash underscore test name in test-build.js.
Former-commit-id: 4723604102d38ea252f867aeab16ce167b1d1a49
2013-06-03 08:00:29 -07:00
John-David Dalton
34a4876761 Cleanup .travis and .ignore files.
Former-commit-id: 268e1eb34f30581ed1a36236970673f389f94bb3
2013-06-03 07:59:44 -07:00
John-David Dalton
13ead0085d Add array and object pools to lodash.
Former-commit-id: f038284d6a544e146dc271ed0fbea0d7401593d4
2013-06-03 07:09:04 -07:00
John-David Dalton
9e63270fc5 Add Volo ignore entry to package.json.
Former-commit-id: 9fe60cf0dcfeb4f688f53ffb1995a619d420d586
2013-06-02 17:29:57 -07:00
John-David Dalton
eccab3cd57 Fix build test for older Node versions w/o setImmediate.
Former-commit-id: 9f21f174626cd86eefd0a26cf0b36a60858ba501
2013-05-30 09:37:09 -04:00
John-David Dalton
6446daf1a6 Remove Instanbul note from README and devDependency from package.json.
Former-commit-id: 891c387534df492f9e4d836daac7adc930205fb3
2013-05-30 08:23:08 -04:00
Mathias Bynens
821602ef1c package.json: Remove Grunt devDependencies
Follow-up commit to dc3512de9f [formerly 6d38406eafbfc880c0b5aabf853c987c65f03482].


Former-commit-id: f8c310cad3fe165b6005312bad74a9abc5148a47
2013-05-30 10:44:08 +02:00
John-David Dalton
dc3512de9f Move istanbul to travis.yml.
Former-commit-id: 6d38406eafbfc880c0b5aabf853c987c65f03482
2013-05-30 03:38:55 -04:00
John-David Dalton
36e9cb7108 Merge branch 'master' of github.com:bestiejs/lodash
Former-commit-id: 629fdb25b4727f8dbf870457196af9a4c43b562d
2013-05-29 17:25:09 -04:00
John-David Dalton
42f4531720 Remove unneeded method from the backbone build and fix build tests.
Former-commit-id: ee463a4af4d458a556f5be666b71b464bae32e6b
2013-05-29 17:06:01 -04:00
Mathias Bynens
d1fb379a40 Enable code coverage
Former-commit-id: 9b52247b6e880f15895842e4ff34c15fc99fd1eb
2013-05-29 17:51:57 +02:00
John-David Dalton
e27bdb965c Add a note about the exposed cache to _.memoize docs.
Former-commit-id: 75939e3ed38fe8447c2f9e45b965a837901bcc4c
2013-05-29 10:30:58 -05:00
John-David Dalton
54fc6df3da Update _.transform docs.
Former-commit-id: ff26ef26e906410787a8819b9c653f20bbdeff38
2013-05-29 09:21:45 -05:00
John-David Dalton
9dd8f62c8a Make Error.prototype unit tests pass in Firefox.
Former-commit-id: 1ff097e7947ba206bc58fe0c319bf36bb64b5387
2013-05-29 09:05:21 -05:00
John-David Dalton
1db19148e7 Update vendors.
Former-commit-id: 6be90c53f9b69d500485492ea2a0ebd288b92abe
2013-05-29 08:56:53 -05:00
John-David Dalton
93a01506e4 Add/fix build tests for mixed method builds.
Former-commit-id: 2b97810ca6960670ea646c6eda962bd4585fda04
2013-05-29 08:30:13 -05:00
John-David Dalton
4767ed790c Add _.findWhere alias.
Former-commit-id: 2c70e59b71c22d902e499747444a196a85691554
2013-05-28 16:08:24 -05:00
John-David Dalton
e39211347c Fix build.
Former-commit-id: f8c32906f46a747b1d610c1c9ca8a8ee3b095d90
2013-05-27 23:54:16 -07:00
John-David Dalton
a8cdbb65fe Move code block to a more related part of build.js.
Former-commit-id: c138608bdff2937c51127e129955143ad7a3caec
2013-05-27 23:21:18 -07:00
John-David Dalton
ff74ff4149 Tweak _.transform docs.
Former-commit-id: dc7100411a403be4cce6b3784e1dd81cc9423b76
2013-05-27 22:31:41 -07:00
John-David Dalton
96e47f3d27 Avoid incorrectly converting local variables to boolean values.
Former-commit-id: 322f6dec4c669bdc1ef534f7786cf12aee580e53
2013-05-27 15:38:11 -07:00
John-David Dalton
be52c181ea Ensure converted !0 and !1 have leading whitespace if needed.
Former-commit-id: 930001f35111d47a51c011c47d6c2608b0bb7e2d
2013-05-27 13:47:01 -07:00
John-David Dalton
507f2ec544 Avoid minifier tricks for boolean literals in expressions.
Former-commit-id: a02445f97a81c330018247140784818be830595f
2013-05-27 13:04:26 -07:00
John-David Dalton
fe00c628f4 Fix build.
Former-commit-id: 8dfb12b5883e59111857360ee5392c62e5e9146f
2013-05-26 23:19:10 -07:00
John-David Dalton
e9387d322c Disable use of basicIndexOf optimization if _.indexOf is customized.
Former-commit-id: 5b2273b36934581e34c6f6042de95bf556c61ca2
2013-05-26 22:46:52 -07:00
John-David Dalton
2e3b135fe9 Rebuild docs and files.
Former-commit-id: 3f0dd7d8a07e2a3694619ce7277573ffb6f88ef6
2013-05-25 01:08:38 -07:00
John-David Dalton
d28cc15be2 Ensure _.isPlainObject returns true for empty objects in older browsers. [closes #283]
Former-commit-id: d01d32b1cbd87d08bc8014d07eaa1842e3118a40
2013-05-25 01:08:08 -07:00
John-David Dalton
d15bd23800 Add *.template.* to .ignore files.
Former-commit-id: d4c34dccb521890de2ced7482628f4796b55dcc1
2013-05-24 09:11:34 -07:00
John-David Dalton
90fe45c52d Tweak regexp in build/post-compile.js used to repair whitespace detection.
Former-commit-id: 7bfe6a6bc0b5e2258c56588d8aacad1e5176d8ba
2013-05-24 09:10:45 -07:00
John-David Dalton
8f7be71905 Avoid escaping existing non-ascii characters in templates. [closes #278]
Former-commit-id: a56581f3e323c0c47e4f26ef8dce13e90fb6c15c
2013-05-24 08:42:11 -07:00
John-David Dalton
5d583637c4 Clarify _.uniq doc example and rebuild files. [closes #282]
Former-commit-id: b3ab9ae81af219dfb75b3f4339555530a6301f6e
2013-05-24 07:53:03 -07:00
John-David Dalton
0efb4285c1 Make capitalize in test/test-build.js consistent with other areas.
Former-commit-id: 2a4b6a2f394e474af2c3ca9376ec0ac2580e9bb9
2013-05-23 20:23:48 -07:00
John-David Dalton
6dc543ca18 Rename internal each to basicEach and add internal overloadWrapper function.
Former-commit-id: b12ea9977ab7b6da877aca5925a9fc59019bec93
2013-05-23 20:23:10 -07:00
John-David Dalton
e93e1ddeb9 Add private function dependencies to help reduce dead code in non-minified builds and allow turning them into modules as part of the modularize build option.
Former-commit-id: e9118c47ae2b66e86332a02b4279999b99b8c429
2013-05-23 20:22:12 -07:00
John-David Dalton
d5459f5996 Reduce test/test-build.js travis-ci time limit.
Former-commit-id: c71f8dec6e7cbd81d8693bd52f1f2d0ef78149a7
2013-05-21 10:46:07 -07:00
John-David Dalton
c6420a910d Cleanup getJavaOptions in build/minify.js.
Former-commit-id: 74a6ddf40eadcfd66c0da243d2496b45bc89d8a1
2013-05-21 09:14:37 -07:00
John-David Dalton
f8e67b8e68 Remove the binding optimization from all but the modern build.
Former-commit-id: 1023ccc976e180425dabaa1b61e873e542aa3c2a
2013-05-21 08:42:13 -07:00
John-David Dalton
9ffcd382b4 Have build.js remove createCache if it's not called in the source.
Former-commit-id: 399d1e19b96b2084cc8cd459d297129db1bda071
2013-05-21 00:30:49 -07:00
John-David Dalton
725746badf Merge branch 'master' of github.com:bestiejs/lodash
Former-commit-id: f3bd8611110e0656b448fd5e7bd6fb88dc7a7213
2013-05-20 22:58:22 -07:00
John-David Dalton
9d5290de91 Rebuild docs and files.
Former-commit-id: 00c9d39304630bf650d7f1c80496c383cdac0ba7
2013-05-20 22:58:08 -07:00
John-David Dalton
1bb0b58cce Rename cachedContains reference in build.js to createCache.
Former-commit-id: 3b8cee53f3b7cadc5350c4261794cec72e704427
2013-05-20 22:57:31 -07:00
John-David Dalton
32f0ebbe61 Avoid issues with Titanium, clearTimeout, and an undefined timer id.
Former-commit-id: 18813fcebbab5185164c236a647b0b6436d495ff
2013-05-20 22:53:27 -07:00
John-David Dalton
25a1d74627 Update test/underscore.html and test/backbone.html to account for chain existing in Lo-Dash.
Former-commit-id: f815e7a3ac6e9cc6c048eab82acc32e462dbb021
2013-05-20 22:52:34 -07:00
John-David Dalton
355b2f09bf Make getDependants work with an array of method names.
Former-commit-id: 55f3721735d93e95da10bb3367f8478d861e683c
2013-05-20 22:10:11 -07:00
John-David Dalton
01621f75b6 Avoid binding functions in _.createCallback if they don't reference this.
Former-commit-id: d491414e7e1536d3241a607ba07120f629ff2410
2013-05-20 09:20:51 -07:00
John-David Dalton
242e8a3bd6 Fix typo left out of the "legacy include=defer" patch.
Former-commit-id: cf8f3e072534a925bdf6a0ebdee65d1280f7d29e
2013-05-20 08:44:12 -07:00
John-David Dalton
010c26e716 Replace cachedContains with createCache and further optimize linear array searches.
Former-commit-id: bfe905985c9125cbadfcf111ffd97b6f8ecdd58d
2013-05-19 19:21:11 -07:00
John-David Dalton
e7bad10663 Ensure mobile builds pass unit tests.
Former-commit-id: 31b4eb76c90f375069ef4a73aa7e3fdbcbda069d
2013-05-19 14:28:23 -07:00
John-David Dalton
16242f98ce Ensure each is converted to forEach when used in a ternary operation.
Former-commit-id: ff42e367f9987726fd561037337081c63c7a5100
2013-05-19 14:23:35 -07:00
Kit Cambridge
14a447b3d8 Ensure that the javaOptions are set correctly, as exec is asynchronous.
Previously, the `java` command would execute on the next tick and update the
`javaOptions` array, which could occur prior to the invocation of the Closure
Compiler on the current tick. This has now been refactored into a separate
`getJavaOptions` function, which passes the `javaOptions` array to a callback.

`getJavaOptions` is defined lazily; after the first invocation, the options
are cached and passed to all subsequent callbacks. The callbacks are invoked
on the next tick for compatibility with `exec`.


Former-commit-id: 89ca63c9edb3df3d4fcbbaa64e06075495febfd0
2013-05-19 14:16:35 -07:00
John-David Dalton
a2088fa500 Rebuild docs, files, and update minifiers.
Former-commit-id: 65b04c3efc7677c8ec5cc7ce6e5840fed23b3716
2013-05-19 13:11:57 -07:00
John-David Dalton
87af68c092 Add Java options for faster Closure Compiler minification to minify.js.
Former-commit-id: b493d461e78d0df80c80805a570220fdff93d487
2013-05-19 11:45:24 -07:00
John-David Dalton
06daad87ca Remove unnecessary semicolons from compiled strings.
Former-commit-id: d4f31dafd3335878469babc5daac45957c6d4e80
2013-05-19 11:36:04 -07:00
John-David Dalton
0b4b86f6c9 Remove ctorByClass from the minified vars list in pre-compile.js.
Former-commit-id: 5f5fe90d6a1a9726a07ee7b4c2c9b9b23b6700d3
2013-05-19 10:58:36 -07:00
John-David Dalton
10626904af Add _.transform unit tests.
Former-commit-id: 34e844950f5c003eeeaf2daea7a5ef6247fbfdab
2013-05-19 10:57:50 -07:00
John-David Dalton
90cca8a3eb Remove Error enum fixes/code from builds that don't need them.
Former-commit-id: db060ff3571ef656709447970b62f4af753ea0cb
2013-05-19 10:52:56 -07:00
John-David Dalton
8da0141cac Fix legacy include=defer build test.
Former-commit-id: 49d0598ad3a979796cd07b6819c0aa08642c93a1
2013-05-19 00:37:40 -07:00
John-David Dalton
39e123aaf4 Rebuild files.
Former-commit-id: ab61934d0b097036dc4cab968d92bfd1450fe8c7
2013-05-18 19:33:17 -07:00
John-David Dalton
24fd17f072 Replace _.isPlainObject with shimIsPlainObject.
Former-commit-id: c1c273a352387e25ae5a6a22dfda8871beac8400
2013-05-18 19:32:16 -07:00
John-David Dalton
9270cc47b5 Add _.transform.
Former-commit-id: 6c040fedd130e8436ff99b1d70892ac8cebbb996
2013-05-18 19:12:22 -07:00
John-David Dalton
3721db34ab Avoid writing a minified file when --stdout is used. [closes #273]
Former-commit-id: 75068b4a92f3a98d4c47ad049e88ef764154bcc1
2013-05-18 09:21:23 -07:00
John-David Dalton
e85ae351c7 Ensure --output paths containing build commands are processed w/o problems.
Former-commit-id: 4790e4e2ea2eba6af8c93e3576858d1f6ff45e70
2013-05-17 08:41:55 -07:00
John-David Dalton
a56ba245ea Fix _.support.enumErrorProps docs.
Former-commit-id: f7aa45537b1e4d173f966a78f89b183c444faaeb
2013-05-16 09:12:56 -07:00
John-David Dalton
d162eed4c7 Rebuild files.
Former-commit-id: dd3db7be0213bfada5ab7d8593e233a9af4a9dd0
2013-05-16 08:48:28 -07:00
John-David Dalton
43fea34f61 Ensure _.chain works as expected.
Former-commit-id: ed176702dc08deeb35d94bb7b40623ab06142848
2013-05-16 08:47:52 -07:00
John-David Dalton
f7c960fc0d Ensure Error is escaped for advanced Closure Compiler minification.
Former-commit-id: 7a9cfbe464afa9e52ec3ed23692965d07db51d32
2013-05-14 22:49:15 -07:00
John-David Dalton
ee1933389a Add _.chain tests and ensure they pass.
Former-commit-id: e365b65da8a740383c975c7b904ad2156d1cc8ab
2013-05-14 22:48:34 -07:00
John-David Dalton
fdc9d5f1fd Rebuild docs and files.
Former-commit-id: 59596707224acabb767b87078d69363c293eec2d
2013-05-14 09:15:48 -07:00
John-David Dalton
bad40b6125 Ensure snippet in iteratorTemplate is minifiable and remove unneeded references from iteratorTemplate.
Former-commit-id: f8c96f63f1a50644c0d2074e5419e68d1a247d46
2013-05-14 09:15:26 -07:00
John-David Dalton
d76ce85327 Add better _.forIn support for legacy browsers.
Former-commit-id: a03ce4662021d6ac8ca12c4885a9c4718c227a30
2013-05-14 09:04:15 -07:00
John-David Dalton
d3df072a22 Make build.js remove extraneous semicolons from inlined methods.
Former-commit-id: 061ed370a4c95a64669335c6b2a5da7ebc1015fd
2013-05-14 08:11:56 -07:00
John-David Dalton
4b3009a195 Ensure _.clone, _.flatten, and _.uniq can be used as a callback for methods like _.map. [closes #270]
Former-commit-id: fb62b5bbdad844cb04c3259c323e27fb81932809
2013-05-14 00:50:57 -07:00
John-David Dalton
b72b0d60cb Add support for floating point numbers to _.random. [closes #263]
Former-commit-id: ef356bb180b163fc936ef69ac2ef33186983eaa7
2013-05-12 15:48:01 -07:00
John-David Dalton
5841e62c66 Add _.chain alias of _. [closes #267]
Former-commit-id: 580e4346444096c7fa77cfc5cf2c68b6cf891fcf
2013-05-11 00:59:48 -07:00
John-David Dalton
9bd0c01702 Expose memoized function's cache. [closes #265]
Former-commit-id: fc44676386854ec9d5fd7a4fac8583508d63949f
2013-05-10 23:22:04 -07:00
John-David Dalton
6d86b3a950 Add _.has unit test.
Former-commit-id: 3334651f8d29e6aa006184846b128acd006157ef
2013-05-10 22:57:08 -07:00
John-David Dalton
5ff9b02c89 Rebuild files and docs.
Former-commit-id: 697fc5842bb6099f48e3731940c9e329452850d2
2013-05-08 01:05:03 -07:00
John-David Dalton
80934ea232 Fix build.
Former-commit-id: 114ddcfec3e9bd4bccf481e8ec943ffdead2bb24
2013-05-08 00:59:37 -07:00
John-David Dalton
5acfa2bf3a Remove _.unzip from the underscore build.
Former-commit-id: 6d0accb64f39b08b72e3165c49a8c844a7a99cd3
2013-05-07 23:49:30 -07:00
John-David Dalton
4fada52e04 Remove nonEnumProps from the modernish builds.
Former-commit-id: 38592e1ee24524b223b801ede8033d7b4ccb8a36
2013-05-07 23:34:17 -07:00
John-David Dalton
e1c8e95e11 Tweak whitespace in iteratorTemplate.
Former-commit-id: 2f9fdbd72d316a1668d34fa95a3f1ecb325d625b
2013-05-07 23:33:04 -07:00
John-David Dalton
1dfebad790 Add a space before define in the minified files so Dojo builder will detect it properly.
Former-commit-id: 3c656ba3b2dd4771eab97c259840c2f426e2454c
2013-05-07 22:14:47 -07:00
John-David Dalton
37ffe63d13 Rename arrayRef to arrayProto in build.js.
Former-commit-id: fec054f96a4972173cb638ee77a7a0d1813c9ad4
2013-05-07 09:24:12 -07:00
John-David Dalton
cc14c34dc2 Allow the underscore build to opt-in to more lodash build methods.
Former-commit-id: 3f685fe1ced25ba37ea9d09e2ed8fa59acb5b8b7
2013-05-07 09:22:31 -07:00
John-David Dalton
e0cf4e644b Add more _.forIn iteration tests and prep support for Error object iteration.
Former-commit-id: 3676681717d0648c9f96570a4952f7c35e6a9bec
2013-05-07 01:38:13 -07:00
John-David Dalton
aad55fc3db Fix trailing parenthesis typo.
Former-commit-id: a9b4fe7408aa9faa7079656c3cb31a4c655544e6
2013-05-06 07:02:53 -07:00
John-David Dalton
ba2b459220 Tweak wiki wording in README.md.
Former-commit-id: 86b1377b1e0eb09bf9e50ac66b988548b022cf96
2013-05-05 23:59:13 -07:00
John-David Dalton
086669fbe0 Ensure _.forIn works over objects with longer inheritance chains in IE < 9.
Former-commit-id: 226223454e71dd8cb6c38a543f1accd915eef3cb
2013-05-05 23:58:33 -07:00
John-David Dalton
4cc3fcb6e8 Ensure unknown objectTypes return false.
Former-commit-id: a60236ecd8908a91c0268d71d5710665986f1ceb
2013-05-05 23:49:37 -07:00
John-David Dalton
8781053dbe Simplify arrays iterator options.
Former-commit-id: 7ea81c03f791615bcfec24d8574162c190d49c7d
2013-05-03 08:51:10 -07:00
John-David Dalton
bdac8974d8 Realign _.assign and _.defaults with ES6 Object.assign. [closes #259]
Former-commit-id: e8c89e4a130ed286ce07e1a2e848f50b182effae
2013-05-03 08:33:51 -07:00
John-David Dalton
9ae24141a3 Cleanup _.debounce.
Former-commit-id: 0212c6b31222a8e215d6f60e906fbad074f424a9
2013-05-02 00:06:55 -07:00
John-David Dalton
e773efdc59 Ensure _.debounce with leading and trailing will call the func on the leading edge after a trailing call is performed. [closes #257]
Former-commit-id: 97afe842b2b4c3eb20c9557298e01ec268386ea2
2013-05-01 09:03:52 -07:00
John-David Dalton
8f94bd1fbd Reduce _.unzip and _.zip.
Former-commit-id: f388c50817910eee510f33b22fd4904fd648a6f0
2013-04-30 09:18:26 -07:00
John-David Dalton
d24d83d52a Ensure remove of the "exit early" feature is handled properly when mixing lodash methods into the underscore build.
Former-commit-id: 973c3e188076ca4403f59684b82bee3049370d5a
2013-04-30 09:12:57 -07:00
John-David Dalton
c938017baa Bump to v1.2.1.
Former-commit-id: ddffb32b2aa61001e81fccfa59b9e9bb38bf7883
2013-04-29 09:10:51 -07:00
John-David Dalton
728eea3ae1 Use zopfli to compress minifiers.
Former-commit-id: 0c68644b7602caf00b02a4977951508aceeb4156
2013-04-29 08:55:07 -07:00
John-David Dalton
88f9c1e539 Add modern build test.
Former-commit-id: 5f1addf774bd9d128095d477c227c4d8420ead5d
2013-04-29 08:54:46 -07:00
John-David Dalton
76540c20f3 Add .map to the ignore files. [ci skip]
Former-commit-id: 129c53ab38b4fbb178b4a832a7abdbf8b055d615
2013-04-29 08:54:15 -07:00
John-David Dalton
70761cf1d9 Avoid false test fails in isType unit tests.
Former-commit-id: b7311a8c3844000efab5d56d3632b99f0bf16ce8
2013-04-28 19:28:40 -07:00
John-David Dalton
ace913a97d Update avatars in READMEs. [ci skip]
Former-commit-id: a4ca090094770481959cd4d4e68ec49696c12f9d
2013-04-28 16:51:53 -07:00
John-David Dalton
d6e269c7f6 Avoid special characters in the whitespace unit test.
Former-commit-id: 5344bbdb0cd96a3a7d275facc7160c1afa1e971e
2013-04-28 16:48:54 -07:00
John-David Dalton
ec10550b3a Ensure the _.isRegExp is correct for various builds.
Former-commit-id: 38cf57053b89b1011bbfbd0b6a9cd31e91589c31
2013-04-28 16:48:13 -07:00
John-David Dalton
86e2374b48 Ensure _.isArray assignment is handled correctly for builds.
Former-commit-id: a844909ada5fbb394cbb91d06e6c76ccc6c40ff7
2013-04-28 15:53:36 -07:00
John-David Dalton
d156dacbb9 Add more .json files to the various ignore files. [ci skip]
Former-commit-id: ff1bce7c404799856f838aab301e60b654309c96
2013-04-28 15:23:53 -07:00
John-David Dalton
1af5517da0 Add component.json. [closes #58]
Former-commit-id: a7edbb3ee80687f3c74fdb2ae37cad553e009766
2013-04-28 00:18:37 -07:00
John-David Dalton
e5d34890a9 Cleanup whitespace characters in strings and fix a whitespace bug in Closure Compiler.
Former-commit-id: d1ab43648f3084b7bcfbd471728b71cea48aa9be
2013-04-27 02:24:25 -07:00
John-David Dalton
183b2548cf Document the radix argument of _.parseInt and ensure it ignores leading whitespace. [closes #254]
Former-commit-id: b1d0f7688402b3f41cfb030c63dcd097ba3f4e68
2013-04-26 22:48:14 -07:00
John-David Dalton
d2de489e3a Update vendors.
Former-commit-id: a36c775be95f95737129965826c2ffcab3fde4f3
2013-04-26 10:44:59 -07:00
Kit Cambridge
90f8dbd86e minify: Send a User-Agent header to avoid 403 responses from GitHub. [ci skip] [closes #255]
Former-commit-id: 1879b790b4ace543430edba6ae62d33c963f0344
2013-04-26 09:38:04 -07:00
John-David Dalton
3508ce19f3 Remove support.argsObject from the underscore build.
Former-commit-id: 4b25a64d662bde78ab6956109b072ed0a4755e53
2013-04-25 09:15:12 -07:00
John-David Dalton
00188c9818 Use -1 as the selectedIndex of the drop down lists when a custom url is used in the perf suite. [ci skip]
Former-commit-id: a3946b9a1d1e129b202606172803daf93afb1fbe
2013-04-24 23:40:41 -07:00
John-David Dalton
499232f0e6 Use lodash.reduce in getGeometricMean of perf.js. [ci skip]
Former-commit-id: 7c5af9afcd56958e03f96d3f13f396894cf95f4b
2013-04-24 21:48:04 -07:00
John-David Dalton
17471a12d2 Add legacy build to the perf suite and ensure belt is assigned the correct value.
Former-commit-id: 568bbd8157155d76d406ae0e33fe71418f4632f4
2013-04-24 12:53:18 -07:00
John-David Dalton
de4b5eeda7 Allow external scripts to be specified and run in the perf suite.
Former-commit-id: 474f0a24d54c800830e2bcec98f6536a17a12bfb
2013-04-24 09:08:46 -07:00
John-David Dalton
d0a0193707 Add missing backticks in the docs. [ci skip]
Former-commit-id: 77e7f0275b820e02d52dea90181fc48ae0f650fe
2013-04-23 20:28:52 -07:00
John-David Dalton
5269a26b69 Merge pull request #253 from ajoslin/master
Fix missing backtick in uniq docs

Former-commit-id: 37b7007e2f2bc8e30f09fb04dc1a2a69c84795e2
2013-04-23 20:14:24 -07:00
Andy Joslin
8dc6ad587f Fix missing backtick in uniq docs
Former-commit-id: f43321cad9391c1b6167cf1ba7a7814e5128948c
2013-04-23 23:07:55 -04:00
John-David Dalton
757339c52d Add more builds to the drop down lists of the perf and test suite.
Former-commit-id: ab565c850a553e70137b064383813812eee4acce
2013-04-23 00:05:37 -07:00
John-David Dalton
6e289339d7 Ensure _.isArray fallback returns a boolean value.
Former-commit-id: c96fb8e95c40d546099796f8337db6d4d3d33aea
2013-04-22 23:56:36 -07:00
John-David Dalton
3ff0a44a1c Tweak perf suite to use geometric mean and remove tests with high variability.
Former-commit-id: ce4ff88ee6be007b761bcf991c59f30f28880973
2013-04-22 08:33:01 -07:00
John-David Dalton
0562228e9a Ensure the modern build version of _.isPlainObject doesn't error when passed an object created via Object.create. [closes #248]
Former-commit-id: d24641ed2562925fbbd2b64653e8e93ab1aa02bc
2013-04-20 19:40:48 -07:00
John-David Dalton
0b6993bb7c Fix _.debounce doc typo.
Former-commit-id: e2659ca38818d15a4080aa8dd605fed99a9eaa43
2013-04-19 09:07:55 -07:00
John-David Dalton
4a19d90d48 Add _.isObject to the isType benchmark.
Former-commit-id: 4e2a61fab31b506bac1d5ce7ad47f7bb2d9e11b6
2013-04-19 01:03:09 -07:00
John-David Dalton
038b1bcf7b Update _.debounce and _.throttle doc examples and rebuild.
Former-commit-id: fc094e857aeae0ab9581ad56dca894cc96bc7b2e
2013-04-19 01:02:36 -07:00
John-David Dalton
a707c2fe8e Ensure isType methods return false for subclassed values.
Former-commit-id: e300d12eb506c6ae4949bd37cf8eb33c3a4be2e1
2013-04-19 00:12:22 -07:00
John-David Dalton
3bb119f578 Update _.debounce and _.throttled docs. [ci skip]
Former-commit-id: 5a94c9d35069952c72303541409b88656deaa6a7
2013-04-17 22:40:49 -07:00
John-David Dalton
2a92600fa7 Add _.throttle unit test to test lastCalled.
Former-commit-id: 528ebd3514aacafcde55fad989f955f1fe403811
2013-04-17 21:36:37 -07:00
John-David Dalton
e80e1dab4d Add lodash underscore build tests for isType methods.
Former-commit-id: 80898964d46abebb3acf1e5e3586f4df700cd85b
2013-04-17 19:53:14 -07:00
John-David Dalton
45d59d75ba Remove stray fs.writeFileSync in build.js.
Former-commit-id: ba94c84ac7e3d2fe9be8e578035132c86cd59790
2013-04-17 19:52:49 -07:00
John-David Dalton
28cd4c3ee9 Update docs & builds.
Former-commit-id: 84fbc06fe506451e70fb76cef16cbc072468df99
2013-04-17 09:04:07 -07:00
John-David Dalton
e7c44274b0 Ensure _.debounce performs a trailing call, when both leading and trailing are true, only after the throttled function is called more than once. [closes #243]
Former-commit-id: 59ac6bc4ece373623f2bd753b662b8cc974cabc8
2013-04-17 08:43:18 -07:00
John-David Dalton
3b2e0e34ef Tweak release notes in README.md. [ci skip]
Former-commit-id: 316e7610ad00ca0b9d6a80ec44d38e1e739dcfd8
2013-04-17 08:07:28 -07:00
168 changed files with 56187 additions and 51845 deletions

18
.editorconfig Normal file
View File

@@ -0,0 +1,18 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
[**.{js,json,md}]
indent_style = space
indent_size = 2
insert_final_newline = true
[**.html]
indent_style = tab
insert_final_newline = false

4
.gitattributes vendored
View File

@@ -1,5 +1 @@
* text=auto
*.js text eol=lf
*.jst text eol=lf
*.sh text eol=lf
*.tpl text eol=lf

5
.gitignore vendored
View File

@@ -1,5 +1,6 @@
.DS_Store
*.custom.*
*.log
*.map
lodash.compat.min.js
node_modules
vendor/closure-compiler
vendor/uglifyjs

View File

@@ -1,14 +0,0 @@
.*
*.custom.*
*.d.ts
*.md
*.txt
build.js
index.js
bower.json
build
doc
node_modules
perf
test
vendor

View File

@@ -1,23 +0,0 @@
.*
*.custom.*
*.d.ts
*.md
bower.json
doc
node_modules
perf
test
vendor/*.gz
vendor/backbone
vendor/benchmark.js
vendor/closure-compiler
vendor/docdown
vendor/firebug-lite
vendor/jquery
vendor/json3
vendor/platform.js
vendor/qunit
vendor/qunit-clib
vendor/requirejs
vendor/uglifyjs
vendor/underscore

View File

@@ -1,20 +1,77 @@
language: node_js
node_js:
- 0.6
- 0.9
- "0.12"
env:
- TEST_COMMAND="phantomjs ./test/test.js ../dist/lodash.compat.js"
- TEST_COMMAND="phantomjs ./test/test.js ../dist/lodash.compat.min.js"
- TEST_COMMAND="node ./test/test.js ../dist/lodash.js"
- TEST_COMMAND="node ./test/test.js ../dist/lodash.min.js"
- TEST_COMMAND="node ./test/test-build.js --time-limit 49m30s"
global:
- PATTERN1="s|^.+?!support\.funcNames\b[\s\S]+?\.name\b[\s\S]+?\}\n||m"
- PATTERN2="s|\s*else\s*\{\s*iteratee\(index\);\s*\}||"
- BIN="node" BUILD="compat" ISTANBUL=false OPTION=""
- NPM_VERSION="^2.0.0" SAUCE_LABS=false SAUCE_USERNAME="lodash"
- secure: "tg1JFsIFnxzLaTboFPOnm+aJCuMm5+JdhLlESlqg9x3fwro++7KCnwHKLNovhchaPe4otC43ZMB/nfWhDnDm11dKbm/V6HlTkED+dadTsaLxVDg6J+7yK41QhokBPJOxLV78iDaNaAQVYEirAgZ0yn8kFubxmNKV+bpCGQNc9yU="
matrix:
- BUILD="compat"
- BUILD="modern"
- BUILD="modern"
- BUILD="modern" ISTANBUL=true
- BIN="phantomjs"
- BIN="rhino" OPTION="-opt -1"
- BIN="rhino" OPTION="-opt -1 -require"
- BIN="ringo"
matrix:
include:
- node_js: "io.js"
env:
- node_js: "io.js"
env: BUILD="modern"
- node_js: "0.8"
env: NPM_VERSION="~1.4.0"
- node_js: "0.8"
env: BUILD="modern" NPM_VERSION="~1.4.0"
- node_js: "0.10"
env:
- node_js: "0.10"
env: BUILD="modern"
- node_js: "0.12"
env: SAUCE_LABS=true
- node_js: "0.12"
env: SAUCE_LABS=true BUILD="modern"
git:
depth: 1
depth: 10
branches:
only:
- master
before_script:
- "tar -xzvf vendor/closure-compiler.tar.gz -C vendor"
- "tar -xzvf vendor/uglifyjs.tar.gz -C vendor"
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/4aab6358b0e9aed0b628
on_success: change
on_failure: always
before_install:
- "nvm use $TRAVIS_NODE_VERSION"
- "npm config set loglevel error"
- "npm i -g npm@\"$NPM_VERSION\""
- "[ $SAUCE_LABS == false ] || npm i chalk@\"^1.0.0\" ecstatic@\"0.8.0\" request@\"^2.0.0\" sauce-tunnel@\"2.2.3\""
- "[ $ISTANBUL == false ] || (npm i -g coveralls@\"^2.0.0\" && npm i istanbul@\"0.3.14\")"
- "[ $BIN != 'rhino' ] || (sudo mkdir /opt/rhino-1.7.6 && sudo wget --no-check-certificate -O $_/js.jar https://lodash.com/_travis/rhino-1.7.6.jar)"
- "[ $BIN != 'rhino' ] || (echo -e '#!/bin/sh\\njava -jar /opt/rhino-1.7.6/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino)"
- "[ $BIN != 'ringo' ] || (wget --no-check-certificate https://lodash.com/_travis/ringojs-0.11.zip && sudo unzip ringojs-0.11 -d /opt && rm ringojs-0.11.zip)"
- "[ $BIN != 'ringo' ] || (sudo ln -s /opt/ringojs-0.11/bin/ringo /usr/local/bin/ringo && sudo chmod +x $_)"
- "perl -pi -e 's|\"lodash\"|\"lodash-compat\"|' ./package.json"
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli.git ./node_modules/lodash-cli && mkdir $_/node_modules && cd $_ && ln -s ../../../ ./lodash-compat && cd ../ && npm i && cd ../../"
- "node ./node_modules/lodash-cli/bin/lodash $BUILD -o ./lodash.$BUILD.js"
script:
$TEST_COMMAND
- "[ $ISTANBUL == false ] || cp ./lodash.$BUILD.js ./lodash.js"
- "[ $ISTANBUL == false ] || perl -0pi -e \"$PATTERN1\" ./lodash.js && perl -0pi -e \"$PATTERN2\" $_"
- "[ $ISTANBUL == false ] || node ./node_modules/istanbul/lib/cli.js cover -x \"**/vendor/**\" --report lcovonly ./test/test.js -- ./lodash.js"
- "[ $ISTANBUL == false ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || (cat ./coverage/lcov.info | coveralls)"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || cd ./test"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || $BIN $OPTION ./test.js ../lodash.$BUILD.js"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || $BIN $OPTION ./test.js ../lodash.$BUILD.min.js"
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.js&noglobals=true\" tags=\"$BUILD,development\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.min.js&noglobals=true\" tags=\"$BUILD,production\""
- "[ $SAUCE_LABS == false ] || [ $BUILD != 'compat' ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.js\" tags=\"$BUILD,development,ie-compat\" compatMode=7"
- "[ $SAUCE_LABS == false ] || [ $BUILD != 'compat' ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.min.js\" tags=\"$BUILD,production,ie-compat\" compatMode=7"
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../lodash.$BUILD.min.js\" tags=\"$BUILD,production,backbone\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../lodash.$BUILD.js\" tags=\"$BUILD,development,backbone\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../lodash.$BUILD.min.js\" tags=\"$BUILD,production,underscore\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../lodash.$BUILD.js\" tags=\"$BUILD,development,underscore\""

View File

@@ -1,21 +1,25 @@
# Contributing to Lo-Dash
# Contributing to lodash
If youd like to contribute a feature or bug fix, you can [fork](https://help.github.com/articles/fork-a-repo) Lo-Dash, commit your changes, and [send a pull request](https://help.github.com/articles/using-pull-requests).
Please make sure to [search the issue tracker](https://github.com/bestiejs/lodash/issues) first; your issue may have already been discussed or fixed in `master`.
If youd like to contribute a feature or bug fix, you can [fork](https://help.github.com/articles/fork-a-repo/) lodash, commit your changes, & [send a pull request](https://help.github.com/articles/using-pull-requests/).
Please make sure to [search the issue tracker](https://github.com/lodash/lodash/issues) first; your issue may have already been discussed or fixed in `master`.
## Tests
Include updated unit tests in the `test` directory as part of your pull request.
You can run the tests from the command line via `npm test`, or open `test/index.html` in a web browser.
The `test/run-test.sh` script attempts to run the tests in [Rhino](https://developer.mozilla.org/en-US/docs/Rhino), [Narwhal](https://github.com/280north/narwhal), [RingoJS](http://ringojs.org/), [PhantomJS](http://phantomjs.org/), and [Node](http://nodejs.org/), before running them in your default browser.
The [Backbone](http://backbonejs.org/) and [Underscore](http://http://underscorejs.org/) test suites are included as well.
Dont worry about regenerating the documentation, lodash.js, or lodash.min.js.
Before running the unit tests youll need to install, `npm i`, [development dependencies](https://docs.npmjs.com/files/package.json#devdependencies).
Run unit tests from the command-line via `node test/test`, or open `test/index.html` in a web browser.
The `test/run-test.sh` script attempts to run the tests in [Rhino](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino), [RingoJS](http://ringojs.org/), [PhantomJS](http://phantomjs.org/), & [Node](http://nodejs.org/), before running them in your default browser.
The [Backbone](http://backbonejs.org/) & [Underscore](http://underscorejs.org/) test suites are included as well.
## Contributor License Agreement
Lo-Dash is a member of the [Dojo Foundation](http://dojofoundation.org/).
lodash is a member of the [Dojo Foundation](http://dojofoundation.org/).
As such, we request that all contributors sign the Dojo Foundation [contributor license agreement](http://dojofoundation.org/about/claForm).
For more information about CLAs, please check out Alex Russells excellent post, ["Why Do I Need to Sign This?"](http://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
For more information about CLAs, please check out Alex Russells excellent post, [Why Do I Need to Sign This?](http://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
## Coding Guidelines
@@ -25,11 +29,11 @@ In addition to the following guidelines, please follow the conventions already e
Use two spaces for indentation. No tabs.
- **Naming**:<br>
Keep variable and method names concise and descriptive.<br>
Variable names `index`, `collection`, and `callback` are preferable to `i`, `arr`, and `fn`.
Keep variable & method names concise & descriptive.<br>
Variable names `index`, `collection`, & `callback` are preferable to `i`, `arr`, & `fn`.
- **Quotes**:<br>
Single-quoted strings are preferred to double-quoted strings; however, please use a double-quoted string if the value contains a single-quote character to avoid unnecessary escaping.
- **Comments**:<br>
Please use single-line comments to annotate significant additions, and [JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for new methods.
Please use single-line comments to annotate significant additions, & [JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for new methods.

View File

@@ -1,6 +1,6 @@
Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
Based on Underscore.js 1.4.3, copyright 2009-2013 Jeremy Ashkenas,
DocumentCloud Inc. <http://underscorejs.org/>
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

288
README.md
View File

@@ -1,281 +1,29 @@
# Lo-Dash <sup>v1.2.0</sup>
# lodash v3.9.3
A low-level utility library delivering consistency, [customization](https://github.com/bestiejs/lodash#custom-builds), [performance](http://lodash.com/benchmarks), and [extra features](https://github.com/bestiejs/lodash#features).
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) with packages for [Bower](http://bower.io/), [Component](http://component.github.io/), & [Volo](http://volojs.org/).
## Download
* Lo-Dash builds (for modern environments):<br>
[Development](https://raw.github.com/bestiejs/lodash/v1.2.0/dist/lodash.js) and
[Production](https://raw.github.com/bestiejs/lodash/v1.2.0/dist/lodash.min.js)
* Lo-Dash compatibility builds (for legacy and modern environments):<br>
[Development](https://raw.github.com/bestiejs/lodash/v1.2.0/dist/lodash.compat.js) and
[Production](https://raw.github.com/bestiejs/lodash/v1.2.0/dist/lodash.compat.min.js)
* Underscore compatibility builds:<br>
[Development](https://raw.github.com/bestiejs/lodash/v1.2.0/dist/lodash.underscore.js) and
[Production](https://raw.github.com/bestiejs/lodash/v1.2.0/dist/lodash.underscore.min.js)
* CDN copies of ≤ v1.2.0s builds are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/):<br>
[Lo-Dash dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.2.0/lodash.js),
[Lo-Dash prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.2.0/lodash.min.js),<br>
[Lo-Dash compat-dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.2.0/lodash.compat.js),
[Lo-Dash compat-prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.2.0/lodash.compat.min.js),<br>
[Underscore compat-dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.2.0/lodash.underscore.js), and
[Underscore compat-prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.2.0/lodash.underscore.min.js)
* For optimal file size, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need
## Dive in
Weve got [API docs](http://lodash.com/docs), [benchmarks](http://lodash.com/benchmarks), and [unit tests](http://lodash.com/tests).
For a list of upcoming features, check out our [roadmap](https://github.com/bestiejs/lodash/wiki/Roadmap).
## Resources
For more information check out these articles, screencasts, and other videos over Lo-Dash:
* Posts
- [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/)
* Videos
- [Introducing Lo-Dash](https://vimeo.com/44154599)
- [Lo-Dash optimizations and custom builds](https://vimeo.com/44154601)
- [Lo-Dashs origin and why its a better utility belt](https://vimeo.com/44154600)
- [Unit testing in Lo-Dash](https://vimeo.com/45865290)
- [Lo-Dashs approach to native method use](https://vimeo.com/48576012)
- [CascadiaJS: Lo-Dash for a better utility belt](http://www.youtube.com/watch?v=dpPy4f_SeEk)
## Features
* AMD loader support ([RequireJS](http://requirejs.org/), [curl.js](https://github.com/cujojs/curl), etc.)
* [_(…)](http://lodash.com/docs#_) supports intuitive chaining
* [_.at](http://lodash.com/docs#at) for cherry-picking collection values
* [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”* defined](http://michaux.ca/articles/lazy-function-definition-pattern) methods
* [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays and objects
* [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` argument
* [_.debounce](http://lodash.com/docs#debounce) and [_.throttle](http://lodash.com/docs#throttle) accept an `options` argument for more control
* [_.createCallback](http://lodash.com/docs#createCallback) to customize how callback arguments are handled and support callback shorthands in mixins
* [_.findIndex](http://lodash.com/docs#findIndex) and [_.findKey](http://lodash.com/docs#findKey) for finding indexes and keys of collections
* [_.forEach](http://lodash.com/docs#forEach) is chainable and supports exiting iteration early
* [_.forIn](http://lodash.com/docs#forIn) for iterating over an objects own and inherited properties
* [_.forOwn](http://lodash.com/docs#forOwn) for iterating over an objects own properties
* [_.isPlainObject](http://lodash.com/docs#isPlainObject) checks if values are created by the `Object` constructor
* [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend)
* [_.parseInt](http://lodash.com/docs#parseInt) for consistent cross-environment behavior
* [_.partial](http://lodash.com/docs#partial) and [_.partialRight](http://lodash.com/docs#partialRight) for partial application without `this` binding
* [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking and extended environment support
* [_.support](http://lodash.com/docs#support) to flag environment features
* [_.template](http://lodash.com/docs#template) supports [*“imports”* options](http://lodash.com/docs#templateSettings_imports), [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6), and [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
* [_.unzip](http://lodash.com/docs#unzip) as the inverse of [_.zip](http://lodash.com/docs#zip)
* [_.where](http://lodash.com/docs#where) supports deep object comparisons
* [_.clone](http://lodash.com/docs#clone), [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick),
[and more…](http://lodash.com/docs "_.assign, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept `callback` and `thisArg` arguments
* [_.contains](http://lodash.com/docs#contains), [_.size](http://lodash.com/docs#size), [_.toArray](http://lodash.com/docs#toArray),
[and more…](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.some, _.sortBy, _.where") accept strings
* [_.filter](http://lodash.com/docs#filter), [_.find](http://lodash.com/docs#find), [_.map](http://lodash.com/docs#map),
[and more…](http://lodash.com/docs "_.countBy, _.every, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* and *“_.where”* `callback` shorthands
## Support
Lo-Dash has been tested in at least Chrome 5~26, Firefox 2~19, IE 6-10, Opera 9.25~12, Safari 3-6, Node.js 0.4.8-0.10.4, Narwhal 0.3.2, PhantomJS 1.9.0, RingoJS 0.9, and Rhino 1.7RC5.
## Custom builds
Custom builds make it easy to create lightweight versions of Lo-Dash containing only the methods you need.
To top it off, we handle all method dependency and alias mapping for you.
* Backbone builds, with only methods required by Backbone, may be created using the `backbone` modifier argument.
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
```bash
lodash backbone
$ lodash modern -o ./lodash.js
```
* Legacy builds, tailored for older environments without [ES5 support](http://es5.github.com/), may be created using the `legacy` modifier argument.
```bash
lodash legacy
```
## Community
* Modern builds, tailored for newer environments with ES5 support, may be created using the `modern` modifier argument.
```bash
lodash modern
```
[![Join the chat at https://gitter.im/lodash/lodash](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/lodash/lodash)
* Mobile builds, without method compilation and most bug fixes for old browsers, may be created using the `mobile` modifier argument.
```bash
lodash mobile
```
## Module formats
* Strict builds, with `_.bindAll`, `_.defaults`, and `_.extend` in [strict mode](http://es5.github.com/#C), may be created using the `strict` modifier argument.
```bash
lodash strict
```
lodash is also available in a variety of other builds & module formats.
* Underscore builds, tailored for projects already using Underscore, may be created using the `underscore` modifier argument.
```bash
lodash underscore
```
* npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds
* AMD modules for [modern](https://github.com/lodash/lodash/tree/3.9.3-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.9.3-amd) builds
* ES modules for the [modern](https://github.com/lodash/lodash/tree/3.9.3-es) build
Custom builds may be created using the following commands:
## Further Reading
* Use the `category` argument to pass comma separated categories of methods to include in the build.<br>
Valid categories (case-insensitive) are *“arrays”*, *“chaining”*, *“collections”*, *“functions”*, *“objects”*, and *“utilities”*.
```bash
lodash category=collections,functions
lodash category="collections, functions"
```
* Use the `exports` argument to pass comma separated names of ways to export the `LoDash` function.<br>
Valid exports are *“amd”*, *“commonjs”*, *“global”*, *“node”*, and *“none”*.
```bash
lodash exports=amd,commonjs,node
lodash exports="amd, commonjs, node"
```
* Use the `iife` argument to specify code to replace the immediately-invoked function expression that wraps Lo-Dash.
```bash
lodash iife="!function(window,undefined){%output%}(this)"
```
* Use the `include` argument to pass comma separated method/category names to include in the build.
```bash
lodash include=each,filter,map
lodash include="each, filter, map"
```
* Use the `minus` argument to pass comma separated method/category names to remove from those included in the build.
```bash
lodash underscore minus=result,shuffle
lodash underscore minus="result, shuffle"
```
* Use the `plus` argument to pass comma separated method/category names to add to those included in the build.
```bash
lodash backbone plus=random,template
lodash backbone plus="random, template"
```
* Use the `template` argument to pass the file path pattern used to match template files to precompile.
```bash
lodash template="./*.jst"
```
* Use the `settings` argument to pass the template settings used when precompiling templates.
```bash
lodash settings="{interpolate:/\{\{([\s\S]+?)\}\}/g}"
```
* Use the `moduleId` argument to specify the AMD module ID of Lo-Dash, which defaults to “lodash”, used by precompiled templates.
```bash
lodash moduleId="underscore"
```
All arguments, except `legacy` with `mobile`, `modern`, or `underscore`, may be combined.<br>
Unless specified by `-o` or `--output`, all files created are saved to the current working directory.
The following options are also supported:
* `-c`, `--stdout` ......... Write output to standard output
* `-d`, `--debug` ........... Write only the non-minified development output
* `-h`, `--help` ............. Display help information
* `-m`, `--minify` ......... Write only the minified production output
* `-o`, `--output` ......... Write output to a given path/filename
* `-p`, `--source-map` .. Generate a source map for the minified output, using an optional source map URL
* `-s`, `--silent` ......... Skip status updates normally logged to the console
* `-V`, `--version` ....... Output current version of Lo-Dash
The `lodash` command-line utility is available when Lo-Dash is installed as a global package (i.e. `npm install -g lodash`).
## Installation and usage
In browsers:
```html
<script src="lodash.js"></script>
```
Using [`npm`](http://npmjs.org/):
```bash
npm install lodash
npm install -g lodash
npm link lodash
```
To avoid potential issues, update `npm` before installing Lo-Dash:
```bash
npm install npm -g
```
In [Node.js](http://nodejs.org/) and [RingoJS ≥ v0.8.0](http://ringojs.org/):
```js
var _ = require('lodash');
// or as a drop-in replacement for Underscore
var _ = require('lodash/dist/lodash.underscore');
```
**Note:** If Lo-Dash is installed globally, run [`npm link lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your projects root directory before requiring it.
In [RingoJS ≤ v0.7.0](http://ringojs.org/):
```js
var _ = require('lodash')._;
```
In [Rhino](http://www.mozilla.org/rhino/):
```js
load('lodash.js');
```
In an AMD loader like [RequireJS](http://requirejs.org/):
```js
require({
'paths': {
'underscore': 'path/to/lodash'
}
},
['underscore'], function(_) {
console.log(_.VERSION);
});
```
## Release Notes
### <sup>v1.2.0</sup>
* Added Bower package support
* Added `_.unzip`
* Added an `options` argument to `_.debounce` and `_.throttle`
* Allowed non-`underscore` builds to include `_.findWhere` and `_.chain`
* Ensured *“Arrays”* and *“Objects”* category methods work with `arguments` objects and arrays respectively
* Ensured build utility runs on Windows
* Ensured `underscore` build versions of *“isType”* methods align with Underscore
* Ensured methods avoid issues with the `__proto__` property
* Ensured `_.merge` applies a `callback` to nested properties
* Ensured `_.merge` passes the correct `callback` arguments when comparing objects
* Made Lo-Dash work with Browserify
* Removed method compilation from the `modern`
The full changelog is available [here](https://github.com/bestiejs/lodash/wiki/Changelog).
## BestieJS
Lo-Dash is part of the BestieJS *“Best in Class”* module collection. This means we promote solid browser/environment support, ES5+ precedents, unit testing, and plenty of documentation.
## Author
* [John-David Dalton](http://allyoucanleet.com/)
[![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter")
## Contributors
* [Kit Cambridge](http://kitcambridge.github.com/)
[![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter")
* [Mathias Bynens](http://mathiasbynens.be/)
[![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter")
* [API Documentation](https://lodash.com/docs)
* [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences)
* [Changelog](https://github.com/lodash/lodash/wiki/Changelog)
* [Release Notes](https://github.com/lodash/lodash/releases)
* [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap)
* [More Resources](https://github.com/lodash/lodash/wiki/Resources)

View File

@@ -1,16 +1,16 @@
{
"name": "lodash",
"version": "1.2.0",
"main": "./lodash.js",
"version": "3.9.3",
"main": "lodash.js",
"ignore": [
".*",
"*.custom.*",
"*.d.ts",
"*.log",
"*.map",
"*.md",
"*.txt",
"build.js",
"index.js",
"build",
"lodash.src.js",
"component.json",
"package.json",
"doc",
"node_modules",
"perf",

3092
build.js

File diff suppressed because it is too large Load Diff

View File

@@ -1,759 +0,0 @@
#!/usr/bin/env node
;(function() {
'use strict';
/** Load Node.js modules */
var https = require('https'),
spawn = require('child_process').spawn,
zlib = require('zlib');
/** Load other modules */
var _ = require('../lodash.js'),
preprocess = require('./pre-compile.js'),
postprocess = require('./post-compile.js'),
tar = require('../vendor/tar/tar.js'),
util = require('./util.js');
/** Module shortcuts */
var fs = util.fs,
path = util.path;
/** The Git object ID of `closure-compiler.tar.gz` */
var closureId = 'fe7665b9fb2378ffaf9e3985268e20e5c72e35fd';
/** The Git object ID of `uglifyjs.tar.gz` */
var uglifyId = '3658629b8c7ae2e686f69eadd788ed792a23f4c6';
/** The path of the directory that is the base of the repository */
var basePath = fs.realpathSync(path.join(__dirname, '..'));
/** The path of the `vendor` directory */
var vendorPath = path.join(basePath, 'vendor');
/** The path to the Closure Compiler `.jar` */
var closurePath = path.join(vendorPath, 'closure-compiler', 'compiler.jar');
/** The path to the UglifyJS module */
var uglifyPath = path.join(vendorPath, 'uglifyjs', 'tools', 'node.js');
/** The Closure Compiler command-line options */
var closureOptions = ['--warning_level=QUIET'];
/** The media type for raw blob data */
var mediaType = 'application/vnd.github.v3.raw';
/** Used to detect the Node.js executable in command-line arguments */
var reNode = RegExp('(?:^|' + path.sepEscaped + ')node(?:\\.exe)?$');
/** Used to reference parts of the blob href */
var location = (function() {
var host = 'api.github.com',
origin = 'https://api.github.com',
pathname = '/repos/bestiejs/lodash/git/blobs';
return {
'host': host,
'href': origin + pathname,
'origin': origin,
'pathname': pathname
};
}());
/** The Closure Compiler optimization modes */
var optimizationModes = {
'simple': 'SIMPLE_OPTIMIZATIONS',
'advanced': 'ADVANCED_OPTIMIZATIONS'
};
/*--------------------------------------------------------------------------*/
/**
* Minifies a given Lo-Dash `source` and invokes the `options.onComplete`
* callback when finished. The `onComplete` callback is invoked with one
* argument; (outputSource).
*
* @param {Array|String} [source=''] The source to minify or array of commands.
* -o, --output - Write output to a given path/filename.
* -s, --silent - Skip status updates normally logged to the console.
* -t, --template - Applies template specific minifier options.
*
* @param {Object} [options={}] The options object.
* outputPath - Write output to a given path/filename.
* isSilent - Skip status updates normally logged to the console.
* isTemplate - Applies template specific minifier options.
* onComplete - The function called once minification has finished.
*/
function minify(source, options) {
// used to specify the source map URL
var sourceMapURL;
// used to specify the default minifer modes
var modes = ['simple', 'advanced', 'hybrid'];
source || (source = '');
options || (options = {});
// juggle arguments
if (Array.isArray(source)) {
// convert commands to an options object
options = source;
// used to report invalid command-line arguments
var invalidArgs = _.reject(options.slice(reNode.test(options[0]) ? 2 : 0), function(value, index, options) {
if (/^(?:-o|--output)$/.test(options[index - 1]) ||
/^modes=.*$/.test(value)) {
return true;
}
var result = [
'-o', '--output',
'-p', '--source-map',
'-s', '--silent',
'-t', '--template'
].indexOf(value) > -1;
if (!result && /^(?:-p|--source-map)$/.test(options[index - 1])) {
result = true;
sourceMapURL = value;
}
return result;
});
// report invalid arguments
if (invalidArgs.length) {
console.log(
'\n' +
'Invalid argument' + (invalidArgs.length > 1 ? 's' : '') +
' passed: ' + invalidArgs.join(', ')
);
return;
}
var filePath = options[options.length - 1],
isMapped = _.contains(options, '-p') || _.contains(options, '--source-map'),
isSilent = _.contains(options, '-s') || _.contains(options, '--silent'),
isTemplate = _.contains(options, '-t') || _.contains(options, '--template'),
outputPath = path.join(path.dirname(filePath), path.basename(filePath, '.js') + '.min.js');
modes = options.reduce(function(result, value) {
var match = value.match(/modes=(.*)$/);
return match ? match[1].split(/, */) : result;
}, modes);
outputPath = options.reduce(function(result, value, index) {
if (/-o|--output/.test(value)) {
result = options[index + 1];
var dirname = path.dirname(result);
fs.mkdirpSync(dirname);
result = path.join(fs.realpathSync(dirname), path.basename(result));
}
return result;
}, outputPath);
options = {
'filePath': filePath,
'isMapped': isMapped,
'isSilent': isSilent,
'isTemplate': isTemplate,
'modes': modes,
'outputPath': outputPath,
'sourceMapURL': sourceMapURL
};
source = fs.readFileSync(filePath, 'utf8');
}
modes = options.modes || modes;
if (options.isMapped) {
modes = modes.filter(function(mode) {
return mode != 'hybrid';
});
}
if (options.isTemplate) {
modes = modes.filter(function(mode) {
return mode != 'advanced';
});
}
options.modes = modes;
// fetch the Closure Compiler
getDependency({
'id': 'closure-compiler',
'hashId': closureId,
'path': vendorPath,
'title': 'the Closure Compiler',
'onComplete': function(exception) {
var error = exception;
// fetch UglifyJS
getDependency({
'id': 'uglifyjs',
'hashId': uglifyId,
'title': 'UglifyJS',
'path': vendorPath,
'onComplete': function(exception) {
error || (error = exception);
if (!error) {
new Minify(source, options);
}
}
});
}
});
}
/**
* The Minify constructor used to keep state of each `minify` invocation.
*
* @private
* @constructor
* @param {String} source The source to minify.
* @param {Object} options The options object.
* outputPath - Write output to a given path/filename.
* isSilent - Skip status updates normally logged to the console.
* isTemplate - Applies template specific minifier options.
* onComplete - The function called once minification has finished.
*/
function Minify(source, options) {
// juggle arguments
if (typeof source == 'object' && source) {
options = source || options;
source = options.source || '';
}
this.compiled = { 'simple': {}, 'advanced': {} };
this.hybrid = { 'simple': {}, 'advanced': {} };
this.uglified = {};
this.filePath = options.filePath;
this.isMapped = !!options.isMapped;
this.isSilent = !!options.isSilent;
this.isTemplate = !!options.isTemplate;
this.outputPath = options.outputPath;
this.sourceMapURL = options.sourceMapURL;
var modes = this.modes = options.modes;
source = this.source = preprocess(source, options);
this.onComplete = options.onComplete || function(data) {
var outputPath = this.outputPath,
sourceMap = data.sourceMap;
fs.writeFileSync(outputPath, data.source, 'utf8');
if (sourceMap) {
fs.writeFileSync(getMapPath(outputPath), sourceMap, 'utf8');
}
};
// begin the minification process
if (_.contains(modes, 'simple')) {
closureCompile.call(this, source, 'simple', onClosureSimpleCompile.bind(this));
} else if (_.contains(modes, 'advanced')) {
onClosureSimpleGzip.call(this);
} else {
onClosureAdvancedGzip.call(this);
}
}
/*--------------------------------------------------------------------------*/
/**
* Fetches a required `.tar.gz` dependency with the given Git object ID from
* the Lo-Dash repo on GitHub. The object ID may be obtained by running
* `git hash-object path/to/dependency.tar.gz`.
*
* @private
* @param {Object} options The options object.
* id - The Git object ID of the `.tar.gz` file.
* onComplete - The function called once the extraction has finished.
* path - The path of the extraction directory.
* title - The dependency's title used in status updates logged to the console.
*/
function getDependency(options) {
options || (options = {});
var ran,
destPath = options.path,
hashId = options.hashId,
id = options.id,
onComplete = options.onComplete,
title = options.title;
// exit early if dependency exists
if (fs.existsSync(path.join(destPath, id))) {
onComplete();
return;
}
var callback = function(exception) {
if (ran) {
return;
}
if (exception) {
console.error([
'There was a problem installing ' + title + '.',
'Try running the command as root, via `sudo`, or manually install by running:',
'',
"curl -H 'Accept: " + mediaType + "' " + location.href + '/' + hashId + " | tar xvz -C '" + destPath + "'",
''
].join('\n'));
}
ran = true;
process.removeListener('uncaughtException', callback);
onComplete(exception);
};
console.log('Downloading ' + title + '...');
process.on('uncaughtException', callback);
https.get({
'host': location.host,
'path': location.pathname + '/' + hashId,
'headers': {
// By default, all GitHub blob API endpoints return a JSON document
// containing Base64-encoded blob data. Overriding the `Accept` header
// with the GitHub raw media type returns the blob data directly.
// See http://developer.github.com/v3/media/.
'Accept': mediaType
}
}, function(response) {
var decompressor = zlib.createUnzip(),
parser = new tar.Extract({ 'path': destPath });
parser.on('end', callback);
response.pipe(decompressor).pipe(parser);
});
}
/**
* Resolves the source map path from the given output path.
*
* @private
* @param {String} outputPath The output path.
* @returns {String} Returns the source map path.
*/
function getMapPath(outputPath) {
return path.join(path.dirname(outputPath), path.basename(outputPath, '.js') + '.map');
}
/*--------------------------------------------------------------------------*/
/**
* Compresses a `source` string using the Closure Compiler. Yields the
* minified result, and any exceptions encountered, to a `callback` function.
*
* @private
* @param {String} source The JavaScript source to minify.
* @param {String} mode The optimization mode.
* @param {Function} callback The function called once the process has completed.
*/
function closureCompile(source, mode, callback) {
var filePath = this.filePath,
isAdvanced = mode == 'advanced',
isMapped = this.isMapped,
options = closureOptions.slice(),
outputPath = this.outputPath,
mapPath = getMapPath(outputPath),
sourceMapURL = this.sourceMapURL || path.basename(mapPath);
// remove copyright header to make other modifications easier
var license = (/^(?:\s*\/\/.*\s*|\s*\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/\s*)*/.exec(source) || [''])[0];
if (license) {
source = source.replace(license, '');
}
var hasIIFE = /^;?\(function[^{]+{/.test(source),
isStrict = hasIIFE && /^;?\(function[^{]+{\s*["']use strict["']/.test(source);
// to avoid stripping the IIFE, convert it to a function call
if (hasIIFE && isAdvanced) {
source = source
.replace(/\(function/, '__iife__$&')
.replace(/\(this\)\)([\s;]*(\n\/\/.+)?)$/, ', this)$1');
}
options.push('--compilation_level=' + optimizationModes[mode]);
if (isMapped) {
options.push('--create_source_map=' + mapPath, '--source_map_format=V3');
}
var compiler = spawn('java', ['-jar', closurePath].concat(options));
if (!this.isSilent) {
console.log('Compressing ' + path.basename(outputPath, '.js') + ' using the Closure Compiler (' + mode + ')...');
}
var error = '';
compiler.stderr.on('data', function(data) {
error += data;
});
var output = '';
compiler.stdout.on('data', function(data) {
output += data;
});
compiler.on('exit', function(status) {
// `status` contains the process exit code
if (status) {
var exception = new Error(error);
exception.status = status;
}
// restore IIFE and move exposed vars inside the IIFE
if (hasIIFE && isAdvanced) {
output = output
.replace(/__iife__\(/, '(')
.replace(/,\s*this\)([\s;]*(\n\/\/.+)?)$/, '(this))$1')
.replace(/^((?:var (?:\w+=(?:!0|!1|null)[,;])+)?)([\s\S]*?function[^{]+{)/, '$2$1');
}
// inject "use strict" directive
if (isStrict) {
output = output.replace(/^[\s\S]*?function[^{]+{/, '$&"use strict";');
}
// restore copyright header
if (license) {
output = license + output;
}
if (isMapped) {
var mapOutput = fs.readFileSync(mapPath, 'utf8');
fs.unlinkSync(mapPath);
output = output.replace(/[\s;]*$/, '\n/*\n//@ sourceMappingURL=' + sourceMapURL) + '\n*/';
mapOutput = JSON.parse(mapOutput);
mapOutput.file = path.basename(outputPath);
mapOutput.sources = [path.basename(filePath)];
mapOutput = JSON.stringify(mapOutput, null, 2);
}
callback(exception, output, mapOutput);
});
// proxy the standard input to the Closure Compiler
compiler.stdin.end(source);
}
/**
* Compresses a `source` string using UglifyJS. Yields the result to a
* `callback` function. This function is synchronous; the `callback` is used
* for symmetry.
*
* @private
* @param {String} source The JavaScript source to minify.
* @param {String} label The label to log.
* @param {Function} callback The function called once the process has completed.
*/
function uglify(source, label, callback) {
if (!this.isSilent) {
console.log('Compressing ' + path.basename(this.outputPath, '.js') + ' using ' + label + '...');
}
try {
var uglifyJS = require(uglifyPath);
// 1. parse
var toplevel = uglifyJS.parse(source);
// 2. compress
// enable unsafe comparisons
toplevel.figure_out_scope();
toplevel = toplevel.transform(uglifyJS.Compressor({
'comparisons': false,
'unsafe': true,
'unsafe_comps': true,
'warnings': false
}));
// 3. mangle
// excluding the `define` function exposed by AMD loaders
toplevel.figure_out_scope();
toplevel.compute_char_frequency();
toplevel.mangle_names({
'except': ['define']
});
// 4. output
// restrict lines to 500 characters for consistency with the Closure Compiler
var stream = uglifyJS.OutputStream({
'ascii_only': true,
'comments': /@cc_on|@license|@preserve/i,
'max_line_len': 500,
});
toplevel.print(stream);
}
catch(e) {
var exception = e;
}
callback(exception, stream && String(stream));
}
/*--------------------------------------------------------------------------*/
/**
* The Closure Compiler callback for simple optimizations.
*
* @private
* @param {Object|Undefined} exception The error object.
* @param {String} result The resulting minified source.
* @param {String} map The source map output.
*/
function onClosureSimpleCompile(exception, result, map) {
if (exception) {
throw exception;
}
result = postprocess(result);
var simple = this.compiled.simple;
simple.source = result;
simple.sourceMap = map;
zlib.gzip(result, onClosureSimpleGzip.bind(this));
}
/**
* The Closure Compiler `gzip` callback for simple optimizations.
*
* @private
* @param {Object|Undefined} exception The error object.
* @param {Buffer} result The resulting gzipped source.
*/
function onClosureSimpleGzip(exception, result) {
if (exception) {
throw exception;
}
if (result != null) {
if (!this.isSilent) {
console.log('Done. Size: %d bytes.', result.length);
}
this.compiled.simple.gzip = result;
}
// compile the source using advanced optimizations
if (_.contains(this.modes, 'advanced')) {
closureCompile.call(this, this.source, 'advanced', onClosureAdvancedCompile.bind(this));
} else {
onClosureAdvancedGzip.call(this);
}
}
/**
* The Closure Compiler callback for advanced optimizations.
*
* @private
* @param {Object|Undefined} exception The error object.
* @param {String} result The resulting minified source.
* @param {String} map The source map output.
*/
function onClosureAdvancedCompile(exception, result, map) {
if (exception) {
throw exception;
}
result = postprocess(result);
var advanced = this.compiled.advanced;
advanced.source = result;
advanced.sourceMap = map;
zlib.gzip(result, onClosureAdvancedGzip.bind(this));
}
/**
* The Closure Compiler `gzip` callback for advanced optimizations.
*
* @private
* @param {Object|Undefined} exception The error object.
* @param {Buffer} result The resulting gzipped source.
*/
function onClosureAdvancedGzip(exception, result) {
if (exception) {
throw exception;
}
if (result != null) {
if (!this.isSilent) {
console.log('Done. Size: %d bytes.', result.length);
}
this.compiled.advanced.gzip = result;
}
// minify the source using UglifyJS
if (!this.isMapped) {
uglify.call(this, this.source, 'UglifyJS', onUglify.bind(this));
} else {
onComplete.call(this);
}
}
/**
* The UglifyJS callback.
*
* @private
* @param {Object|Undefined} exception The error object.
* @param {String} result The resulting minified source.
*/
function onUglify(exception, result) {
if (exception) {
throw exception;
}
result = postprocess(result);
this.uglified.source = result;
zlib.gzip(result, onUglifyGzip.bind(this));
}
/**
* The UglifyJS `gzip` callback.
*
* @private
* @param {Object|Undefined} exception The error object.
* @param {Buffer} result The resulting gzipped source.
*/
function onUglifyGzip(exception, result) {
if (exception) {
throw exception;
}
if (result != null) {
if (!this.isSilent) {
console.log('Done. Size: %d bytes.', result.length);
}
this.uglified.gzip = result;
}
// minify the already Closure Compiler simple optimized source using UglifyJS
var modes = this.modes;
if (_.contains(modes, 'hybrid')) {
if (_.contains(modes, 'simple')) {
uglify.call(this, this.compiled.simple.source, 'hybrid (simple)', onSimpleHybrid.bind(this));
} else if (_.contains(modes, 'advanced')) {
onSimpleHybridGzip.call(this);
}
} else {
onComplete.call(this);
}
}
/**
* The hybrid callback for simple optimizations.
*
* @private
* @param {Object|Undefined} exception The error object.
* @param {String} result The resulting minified source.
*/
function onSimpleHybrid(exception, result) {
if (exception) {
throw exception;
}
result = postprocess(result);
this.hybrid.simple.source = result;
zlib.gzip(result, onSimpleHybridGzip.bind(this));
}
/**
* The hybrid `gzip` callback for simple optimizations.
*
* @private
* @param {Object|Undefined} exception The error object.
* @param {Buffer} result The resulting gzipped source.
*/
function onSimpleHybridGzip(exception, result) {
if (exception) {
throw exception;
}
if (result != null) {
if (!this.isSilent) {
console.log('Done. Size: %d bytes.', result.length);
}
this.hybrid.simple.gzip = result;
}
// minify the already Closure Compiler advance optimized source using UglifyJS
if (_.contains(this.modes, 'advanced')) {
uglify.call(this, this.compiled.advanced.source, 'hybrid (advanced)', onAdvancedHybrid.bind(this));
} else {
onComplete.call(this);
}
}
/**
* The hybrid callback for advanced optimizations.
*
* @private
* @param {Object|Undefined} exception The error object.
* @param {String} result The resulting minified source.
*/
function onAdvancedHybrid(exception, result) {
if (exception) {
throw exception;
}
result = postprocess(result);
this.hybrid.advanced.source = result;
zlib.gzip(result, onAdvancedHybridGzip.bind(this));
}
/**
* The hybrid `gzip` callback for advanced optimizations.
*
* @private
* @param {Object|Undefined} exception The error object.
* @param {Buffer} result The resulting gzipped source.
*/
function onAdvancedHybridGzip(exception, result) {
if (exception) {
throw exception;
}
if (result != null) {
if (!this.isSilent) {
console.log('Done. Size: %d bytes.', result.length);
}
this.hybrid.advanced.gzip = result;
}
// finish by choosing the smallest compressed file
onComplete.call(this);
}
/**
* The callback executed after the source is minified and gzipped.
*
* @private
*/
function onComplete() {
var compiledSimple = this.compiled.simple,
compiledAdvanced = this.compiled.advanced,
uglified = this.uglified,
hybridSimple = this.hybrid.simple,
hybridAdvanced = this.hybrid.advanced;
var objects = [
compiledSimple,
compiledAdvanced,
uglified,
hybridSimple,
hybridAdvanced
];
var gzips = objects
.map(function(data) { return data.gzip; })
.filter(Boolean);
// select the smallest gzipped file and use its minified counterpart as the
// official minified release (ties go to the Closure Compiler)
var min = gzips.reduce(function(min, gzip) {
var length = gzip.length;
return min > length ? length : min;
}, Infinity);
// pass the minified source to the "onComplete" callback
objects.some(function(data) {
var gzip = data.gzip;
if (gzip && gzip.length == min) {
data.outputPath = this.outputPath;
this.onComplete(data);
return true;
}
}, this);
}
/*--------------------------------------------------------------------------*/
// expose `minify`
if (module != require.main) {
module.exports = minify;
}
else {
// read the Lo-Dash source file from the first argument if the script
// was invoked directly (e.g. `node minify.js source.js`) and write to
// `<filename>.min.js`
(function() {
var options = process.argv;
if (options.length < 3) {
return;
}
minify(options);
}());
}
}());

View File

@@ -1,77 +0,0 @@
#!/usr/bin/env node
;(function() {
'use strict';
/** The Node.js filesystem module */
var fs = require('fs');
/** The minimal license/copyright template */
var licenseTemplate = [
'/**',
' * @license',
' * Lo-Dash <%= VERSION %> lodash.com/license',
' * Underscore.js 1.4.4 underscorejs.org/LICENSE',
' */'
].join('\n');
/*--------------------------------------------------------------------------*/
/**
* Post-process a given minified Lo-Dash `source`, preparing it for
* deployment.
*
* @param {String} source The source to process.
* @returns {String} Returns the processed source.
*/
function postprocess(source) {
// remove copyright header
source = source.replace(/^\/\**[\s\S]+?\*\/\n/, '');
// correct overly aggressive Closure Compiler advanced optimization
source = source.replace(/(document[^&]+&&)\s*(?:\w+|!\d)/, '$1!({toString:0}+"")');
// flip `typeof` expressions to help optimize Safari and
// correct the AMD module definition for AMD build optimizers
// (e.g. from `"number" == typeof x` to `typeof x == "number")
source = source.replace(/(\w)?("[^"]+")\s*([!=]=)\s*(typeof(?:\s*\([^)]+\)|\s+[.\w]+(?!\[)))/g, function(match, other, type, equality, expression) {
return (other ? other + ' ' : '') + expression + equality + type;
});
// add trailing semicolon
if (source) {
source = source.replace(/[\s;]*?(\s*\/\/.*\s*|\s*\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/\s*)*$/, ';$1');
}
// exit early if version snippet isn't found
var snippet = /VERSION\s*[=:]\s*([\'"])(.*?)\1/.exec(source);
if (!snippet) {
return source;
}
// add new copyright header
var version = snippet[2];
source = licenseTemplate.replace('<%= VERSION %>', version) + '\n;' + source;
return source;
}
/*--------------------------------------------------------------------------*/
// expose `postprocess`
if (module != require.main) {
module.exports = postprocess;
}
else {
// read the Lo-Dash source file from the first argument if the script
// was invoked directly (e.g. `node post-compile.js source.js`) and write to
// the same file
(function() {
var options = process.argv;
if (options.length < 3) {
return;
}
var filePath = options[options.length - 1],
source = fs.readFileSync(filePath, 'utf8');
fs.writeFileSync(filePath, postprocess(source), 'utf8');
}());
}
}());

View File

@@ -1,420 +0,0 @@
#!/usr/bin/env node
;(function() {
'use strict';
/** The Node.js filesystem module */
var fs = require('fs');
/** Used to minify variables embedded in compiled strings */
var compiledVars = [
'args',
'argsIndex',
'argsLength',
'callback',
'collection',
'ctor',
'guard',
'hasOwnProperty',
'index',
'isArguments',
'isArray',
'isString',
'iterable',
'length',
'keys',
'lodash',
'object',
'objectTypes',
'ownIndex',
'ownProps',
'result',
'skipProto',
'source',
'thisArg'
];
/** Used to minify `iteratorTemplate` data properties */
var iteratorOptions = [
'args',
'arrays',
'bottom',
'firstArg',
'init',
'loop',
'shadowedProps',
'top',
'useHas',
'useKeys'
];
/** Used to minify variables and string values to a single character */
var minNames = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
minNames.push.apply(minNames, minNames.map(function(value) {
return value + value;
}));
/** Used to protect the specified properties from getting minified */
var propWhitelist = [
'Array',
'Boolean',
'Date',
'Function',
'Math',
'Number',
'Object',
'RegExp',
'String',
'TypeError',
'VERSION',
'_',
'__wrapped__',
'after',
'all',
'amd',
'any',
'argsClass',
'argsObject',
'assign',
'at',
'attachEvent',
'bind',
'bindAll',
'bindKey',
'clearTimeout',
'clone',
'cloneDeep',
'collect',
'compact',
'compose',
'contains',
'countBy',
'createCallback',
'criteria',
'debounce',
'defaults',
'defer',
'delay',
'detect',
'difference',
'drop',
'each',
'enumPrototypes',
'environment',
'escape',
'evaluate',
'every',
'exports',
'extend',
'fastBind',
'fastKeys',
'filter',
'find',
'findIndex',
'findKey',
'first',
'flatten',
'foldl',
'foldr',
'forEach',
'forIn',
'forOwn',
'functions',
'global',
'groupBy',
'has',
'head',
'identity',
'imports',
'include',
'index',
'indexOf',
'initial',
'inject',
'interpolate',
'intersection',
'invert',
'invoke',
'isArguments',
'isArray',
'isBoolean',
'isDate',
'isElement',
'isEmpty',
'isEqual',
'isEqual',
'isFinite',
'isFinite',
'isFunction',
'isNaN',
'isNull',
'isNumber',
'isObject',
'isPlainObject',
'isRegExp',
'isString',
'isUndefined',
'keys',
'last',
'lastIndexOf',
'leading',
'map',
'max',
'memoize',
'merge',
'methods',
'min',
'mixin',
'noConflict',
'nodeClass',
'nonEnumArgs',
'nonEnumShadows',
'object',
'omit',
'once',
'ownLast',
'pairs',
'parseInt',
'partial',
'partialRight',
'pick',
'pluck',
'random',
'range',
'reduce',
'reduceRight',
'reject',
'rest',
'result',
'runInContext',
'select',
'setImmediate',
'setTimeout',
'shuffle',
'size',
'some',
'sortBy',
'sortedIndex',
'source',
'spliceObjects',
'support',
'tail',
'take',
'tap',
'template',
'templateSettings',
'throttle',
'times',
'toArray',
'trailing',
'unescape',
'unindexedChars',
'union',
'uniq',
'unique',
'uniqueId',
'unzip',
'value',
'values',
'variable',
'where',
'window',
'without',
'wrap',
'zip',
'zipObject',
// properties used by the `backbone` and `underscore` builds
'__chain__',
'chain',
'findWhere'
];
/*--------------------------------------------------------------------------*/
/**
* Pre-process a given Lo-Dash `source`, preparing it for minification.
*
* @param {String} [source=''] The source to process.
* @param {Object} [options={}] The options object.
* @returns {String} Returns the processed source.
*/
function preprocess(source, options) {
source || (source = '');
options || (options = {});
// remove unrecognized JSDoc tags so the Closure Compiler won't complain
source = source.replace(/@(?:alias|category)\b.*/g, '');
if (options.isTemplate) {
return source;
}
// add brackets to whitelisted properties so the Closure Compiler won't mung them
// http://code.google.com/closure/compiler/docs/api-tutorial3.html#export
source = source.replace(RegExp('\\.(' + propWhitelist.join('|') + ')\\b', 'g'), function(match, prop) {
return "['" + prop.replace(/['\n\r\t]/g, '\\$&') + "']";
});
// remove brackets from `lodash.createCallback` in `eachIteratorOptions`
source = source.replace('lodash[\'createCallback\'](callback, thisArg)"', 'lodash.createCallback(callback, thisArg)"');
// remove brackets from `lodash.createCallback` in `_.assign`
source = source.replace("' var callback = lodash['createCallback']", "'var callback=lodash.createCallback");
// remove brackets from `_.escape` in `_.template`
source = source.replace(/__e *= *_\['escape']/g, '__e=_.escape');
// remove brackets from `collection.indexOf` in `_.contains`
source = source.replace("collection['indexOf'](target)", 'collection.indexOf(target)');
// remove brackets from `result[length].value` in `_.sortBy`
source = source.replace("result[length]['value']", 'result[length].value');
// remove whitespace from string literals
source = source.replace(/^((?:[ "'\w]+:)? *)"[^"\\\n]*(?:\\.[^"\\\n]*)*"|'[^'\\\n]*(?:\\.[^'\\\n]*)*'/gm, function(string, left) {
// clip after an object literal property name or leading spaces
if (left) {
string = string.slice(left.length);
}
// avoids removing the '\n' of the `stringEscapes` object
string = string.replace(/\[object |delete |else (?!{)|function | in |return\s+[\w"']|throw |typeof |use strict|var |@ |(["'])\\n\1|\\\\n|\\n|\s+/g, function(match) {
return match == false || match == '\\n' ? '' : match;
});
// unclip
return (left || '') + string;
});
// remove whitespace from `_.template` related regexes
source = source.replace(/reEmptyString\w+ *=.+/g, function(match) {
return match.replace(/ |\\n/g, '');
});
// remove newline from double-quoted strings in `_.template`
source = source
.replace('"__p += \'"', '"__p+=\'"')
.replace('"\';\n"', '"\';"')
// remove debug sourceURL use in `_.template`
source = source.replace(/(?:\s*\/\/.*\n)* *var sourceURL[^;]+;|\+ *sourceURL/g, '');
// minify internal properties used by 'compareAscending' and `_.sortBy`
(function() {
var properties = ['criteria', 'index', 'value'],
snippets = source.match(/( +)function (?:compareAscending|sortBy)\b[\s\S]+?\n\1}/g);
if (!snippets) {
return;
}
snippets.forEach(function(snippet) {
var modified = snippet;
// minify properties
properties.forEach(function(property, index) {
var minName = minNames[index],
reBracketProp = RegExp("\\['(" + property + ")'\\]", 'g'),
reDotProp = RegExp('\\.' + property + '\\b', 'g'),
rePropColon = RegExp("([^?\\s])\\s*([\"'])?\\b" + property + "\\2 *:", 'g');
modified = modified
.replace(reBracketProp, "['" + minName + "']")
.replace(reDotProp, "['" + minName + "']")
.replace(rePropColon, "$1'" + minName + "':");
});
// replace with modified snippet
source = source.replace(snippet, function() {
return modified;
});
});
}());
// minify all compilable snippets
var snippets = source.match(
RegExp([
// match the `iteratorTemplate`
'( +)var iteratorTemplate\\b[\\s\\S]+?\\n\\1}',
// match methods created by `createIterator` calls
'createIterator\\((?:{|[a-zA-Z]+)[\\s\\S]*?\\);\\n',
// match variables storing `createIterator` options
'( +)var [a-zA-Z]+IteratorOptions\\b[\\s\\S]+?\\n\\2}',
// match the the `createIterator` function
'( +)function createIterator\\b[\\s\\S]+?\\n\\3}'
].join('|'), 'g')
);
// exit early if no compilable snippets
if (!snippets) {
return source;
}
snippets.forEach(function(snippet, index) {
var isCreateIterator = /function createIterator\b/.test(snippet),
isIteratorTemplate = /var iteratorTemplate\b/.test(snippet),
modified = snippet;
// add brackets to iterator option properties so the Closure Compiler won't mung them
modified = modified.replace(RegExp('\\.(' + iteratorOptions.join('|') + ')\\b', 'g'), function(match, prop) {
return "['" + prop.replace(/['\n\r\t]/g, '\\$&') + "']";
});
// minify `createIterator` option property names
iteratorOptions.forEach(function(property, index) {
var minName = minNames[index];
// minify variables in `iteratorTemplate` or property names in everything else
modified = isIteratorTemplate
? modified.replace(RegExp('\\b' + property + '\\b', 'g'), minName)
: modified.replace(RegExp("'" + property + "'", 'g'), "'" + minName + "'");
});
// minify snippet variables / arguments
compiledVars.forEach(function(varName, index) {
var minName = minNames[index];
// minify variable names present in strings
if (isCreateIterator) {
modified = modified.replace(RegExp('(([\'"])[^\\n\\2]*?)\\b' + varName + '\\b(?=[^\\n\\2]*\\2[ ,+]+$)', 'gm'), '$1' + minName);
}
// ensure properties in compiled strings aren't minified
else {
modified = modified.replace(RegExp('([^.])\\b' + varName + '\\b(?!\' *[\\]:])', 'g'), '$1' + minName);
}
// correct `typeof` values
if (/^(?:boolean|function|object|number|string|undefined)$/.test(varName)) {
modified = modified.replace(RegExp("(typeof [^']+')" + minName + "'", 'g'), '$1' + varName + "'");
}
});
// replace with modified snippet
source = source.replace(snippet, function() {
return modified;
});
});
return source;
}
/*--------------------------------------------------------------------------*/
// expose `preprocess`
if (module != require.main) {
module.exports = preprocess;
}
else {
// read the Lo-Dash source file from the first argument if the script
// was invoked directly (e.g. `node pre-compile.js source.js`) and write to
// the same file
(function() {
var options = process.argv;
if (options.length < 3) {
return;
}
var filePath = options[options.length - 1],
isTemplate = options.indexOf('-t') > -1 || options.indexOf('--template') > -1,
source = fs.readFileSync(filePath, 'utf8');
fs.writeFileSync(filePath, preprocess(source, {
'isTemplate': isTemplate
}), 'utf8');
}());
}
}());

View File

@@ -1,98 +0,0 @@
#!/usr/bin/env node
;(function() {
'use strict';
/** Load Node.js modules */
var fs = require('fs'),
path = require('path');
/** Load other modules */
var _ = require('../lodash.js');
/** Used to indicate if running in Windows */
var isWindows = process.platform == 'win32';
/*--------------------------------------------------------------------------*/
/**
* The path separator.
*
* @memberOf util.path
* @type String
*/
var sep = path.sep || (isWindows ? '\\' : '/');
/**
* The escaped path separator used for inclusion in RegExp strings.
*
* @memberOf util.path
* @type String
*/
var sepEscaped = sep.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
/** Used to determine if a path is prefixed with a drive letter, dot, or slash */
var rePrefixed = RegExp('^(?:' + (isWindows ? '[a-zA-Z]:|' : '') + '\\.?)' + sepEscaped);
/*--------------------------------------------------------------------------*/
/**
* Makes the given `dirname` directory, without throwing errors for existing
* directories and making parent directories as needed.
*
* @memberOf util.fs
* @param {String} dirname The path of the directory.
* @param {Number|String} [mode='0777'] The permission mode.
*/
function mkdirpSync(dirname, mode) {
// ensure relative paths are prefixed with `./`
if (!rePrefixed.test(dirname)) {
dirname = '.' + sep + dirname;
}
dirname.split(sep).reduce(function(currPath, segment) {
currPath += sep + segment;
try {
currPath = fs.realpathSync(currPath);
} catch(e) {
fs.mkdirSync(currPath, mode);
}
return currPath;
});
}
/*--------------------------------------------------------------------------*/
/**
* The utility object.
*
* @type Object
*/
var util = {
/**
* The file system object.
*
* @memberOf util
* @type Object
*/
'fs': _.defaults(_.cloneDeep(fs), {
'existsSync': fs.existsSync || path.existsSync,
'mkdirpSync': mkdirpSync
}),
/**
* The path object.
*
* @memberOf util
* @type Object
*/
'path': _.defaults(_.cloneDeep(path), {
'sep': sep,
'sepEscaped': sepEscaped
})
};
/*--------------------------------------------------------------------------*/
// expose
module.exports = util;
}());

10
component.json Normal file
View File

@@ -0,0 +1,10 @@
{
"name": "lodash",
"repo": "lodash/lodash",
"version": "3.9.3",
"description": "The modern build of lodash.",
"license": "MIT",
"main": "lodash.js",
"keywords": ["stdlib", "util"],
"scripts": ["lodash.js"]
}

5516
dist/lodash.compat.js vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,46 +0,0 @@
/**
* @license
* Lo-Dash 1.2.0 (Custom Build) lodash.com/license
* Build: `lodash -o ./dist/lodash.compat.js`
* Underscore.js 1.4.4 underscorejs.org/LICENSE
*/
;(function(n){function t(r){function a(n){return n&&typeof n=="object"&&!Z(n)&&Qt.call(n,"__wrapped__")?n:new U(n)}function F(n){var t=n.length,e=t>=l;if(e)for(var r={},u=-1;++u<t;){var a=f+n[u];(r[a]||(r[a]=[])).push(n[u])}return function(t){if(e){var u=f+t;return r[u]&&-1<_t(r[u],t)}return-1<_t(n,t)}}function R(n){return n.charCodeAt(0)}function T(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function D(n,t,e,r){function u(){var r=arguments,l=o?this:t;
return a||(n=t[i]),e.length&&(r=r.length?(r=le.call(r),f?r.concat(e):e.concat(r)):e),this instanceof u?(V.prototype=n.prototype,l=new V,V.prototype=null,r=n.apply(l,r),et(r)?r:l):n.apply(l,r)}var a=tt(n),o=!e,i=t;if(o){var f=r;e=t}else if(!a){if(!r)throw new Dt;t=n}return u}function z(){for(var n,t={g:C,b:"k(m)",c:"",e:"m",f:"",h:"",i:!0,j:!!de},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],e=$t,r="var i,m="+t.d+",u="+t.e+";if(!m)return u;"+t.h+";",t.b?(r+="var n=m.length;i=-1;if("+t.b+"){",ve.unindexedChars&&(r+="if(l(m)){m=m.split('')}"),r+="while(++i<n){"+t.f+"}}else{"):ve.nonEnumArgs&&(r+="var n=m.length;i=-1;if(n&&j(m)){while(++i<n){i+='';"+t.f+"}}else{"),ve.enumPrototypes&&(r+="var v=typeof m=='function';"),t.i&&t.j)r+="var s=-1,t=r[typeof m]?o(m):[],n=t.length;while(++s<n){i=t[s];",ve.enumPrototypes&&(r+="if(!(v&&i=='prototype')){"),r+=t.f,ve.enumPrototypes&&(r+="}"),r+="}";
else if(r+="for(i in m){",(ve.enumPrototypes||t.i)&&(r+="if(",ve.enumPrototypes&&(r+="!(v&&i=='prototype')"),ve.enumPrototypes&&t.i&&(r+="&&"),t.i&&(r+="h.call(m,i)"),r+="){"),r+=t.f+";",(ve.enumPrototypes||t.i)&&(r+="}"),r+="}",ve.nonEnumShadows){r+="var f=m.constructor;";for(var u=0;7>u;u++)r+="i='"+t.g[u]+"';if(","constructor"==t.g[u]&&(r+="!(f&&f.prototype===m)&&"),r+="h.call(m,i)){"+t.f+"}"}return(t.b||ve.nonEnumArgs)&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,p,r","return function("+n+"){"+r+"}")(Qt,Q,Z,ut,de,a,$)
}function L(n){return"\\"+q[n]}function K(n){return _e[n]}function M(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function U(n){this.__wrapped__=n}function V(){}function G(n){var t=!1;if(!n||Zt.call(n)!=A||!ve.argsClass&&Q(n))return t;var e=n.constructor;return(tt(e)?e instanceof e:ve.nodeClass||!M(n))?ve.ownLast?(ke(n,function(n,e,r){return t=Qt.call(r,e),!1}),!0===t):(ke(n,function(n,e){t=e}),!1===t||Qt.call(n,t)):t}function H(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);
var r=-1;e=e-t||0;for(var u=It(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function J(n){return we[n]}function Q(n){return Zt.call(n)==j}function W(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;f=n}if(u=et(f)){var l=Zt.call(f);if(!N[l]||!ve.nodeClass&&M(f))return f;var c=Z(f)}if(!u||!t)return u?c?H(f):Ce({},f):f;switch(u=se[l],l){case x:case O:return new u(+f);case S:case P:return new u(f);
case I:return u(f.source,h.exec(f))}for(o||(o=[]),i||(i=[]),l=o.length;l--;)if(o[l]==n)return i[l];return f=c?u(f.length):{},c&&(Qt.call(n,"index")&&(f.index=n.index),Qt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(c?pt:xe)(n,function(n,u){f[u]=W(n,t,r,e,o,i)}),f}function X(n){var t=[];return ke(n,function(n,e){tt(n)&&t.push(e)}),t.sort()}function Y(n){for(var t=-1,e=de(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Z(n){return ve.argsObject&&n instanceof It||(te?te(n):Zt.call(n)==k)
}function nt(n,t,e,r,u,o){var f=e===i;if(typeof e=="function"&&!f){e=a.createCallback(e,r,2);var l=e(n,t);if(typeof l!="undefined")return!!l}if(n===t)return 0!==n||1/n==1/t;var c=typeof n,p=typeof t;if(n===n&&(!n||"function"!=c&&"object"!=c)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Zt.call(n),c=Zt.call(t),p==j&&(p=A),c==j&&(c=A),p!=c)return!1;switch(p){case x:case O:return+n==+t;case S:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case I:case P:return n==Tt(t)}if(c=p==k,!c){if(Qt.call(n,"__wrapped__")||Qt.call(t,"__wrapped__"))return nt(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);
if(p!=A||!ve.nodeClass&&(M(n)||M(t)))return!1;var p=!ve.argsObject&&Q(n)?Ft:n.constructor,s=!ve.argsObject&&Q(t)?Ft:t.constructor;if(p!=s&&(!tt(p)||!(p instanceof p&&tt(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,l=!0;if(u.push(n),o.push(t),c){if(p=n.length,v=t.length,l=v==n.length,!l&&!f)return l;for(;v--;)if(c=p,s=t[v],f)for(;c--&&!(l=nt(n[c],s,e,r,u,o)););else if(!(l=nt(n[v],s,e,r,u,o)))break;return l}return ke(t,function(t,a,i){return Qt.call(i,a)?(v++,l=Qt.call(n,a)&&nt(n[a],t,e,r,u,o)):void 0
}),l&&!f&&ke(n,function(n,t,e){return Qt.call(e,t)?l=-1<--v:void 0}),l}function tt(n){return typeof n=="function"}function et(n){return n?$[typeof n]:!1}function rt(n){return typeof n=="number"||Zt.call(n)==S}function ut(n){return typeof n=="string"||Zt.call(n)==P}function at(n,t,e){var r=arguments,u=0,o=2;if(!et(n))return n;if(e===i)var f=r[3],l=r[4],c=r[5];else l=[],c=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);
for(;++u<o;)(Z(r[u])?pt:xe)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=Z(t))||Oe(t))){for(a=l.length;a--;)if(r=l[a]==t){o=c[a];break}if(!r){var p;f&&(a=f(o,t),p=typeof a!="undefined")&&(o=a),p||(o=u?Z(o)?o:[]:Oe(o)?o:{}),l.push(t),c.push(o),p||(o=at(o,t,i,f,l,c))}}else f&&(a=f(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);n[e]=o});return n}function ot(n){for(var t=-1,e=de(n),r=e.length,u=It(r);++t<r;)u[t]=n[e[t]];return u}function it(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?ae(0,u+e):e)||0,typeof u=="number"?a=-1<(ut(n)?n.indexOf(t,e):_t(n,t,e)):be(n,function(n){return++r<e?void 0:!(a=n===t)
}),a}function ft(n,t,e){var r=!0;if(t=a.createCallback(t,e),Z(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else be(n,function(n,e,u){return r=!!t(n,e,u)});return r}function lt(n,t,e){var r=[];if(t=a.createCallback(t,e),Z(n)){e=-1;for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else be(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ct(n,t,e){if(t=a.createCallback(t,e),!Z(n)){var r;return be(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0}),r}e=-1;for(var u=n.length;++e<u;){var o=n[e];
if(t(o,e,n))return o}}function pt(n,t,e){if(t&&typeof e=="undefined"&&Z(n)){e=-1;for(var r=n.length;++e<r&&!1!==t(n[e],e,n););}else be(n,t,e);return n}function st(n,t,e){var r=-1,u=n?n.length:0,o=It(typeof u=="number"?u:0);if(t=a.createCallback(t,e),Z(n))for(;++r<u;)o[r]=t(n[r],r,n);else be(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function vt(n,t,e){var r=-1/0,u=r;if(!t&&Z(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&ut(n)?R:a.createCallback(t,e),be(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)
});return u}function gt(n,t,e,r){var u=3>arguments.length;if(t=a.createCallback(t,r,4),Z(n)){var o=-1,i=n.length;for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n)}else be(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)});return e}function ht(n,t,e,r){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=de(n),o=f.length;else ve.unindexedChars&&ut(n)&&(u=n.split(""));return t=a.createCallback(t,r,4),pt(n,function(n,r,a){r=f?f[--o]:--o,e=i?(i=!1,u[r]):t(e,u[r],r,a)}),e}function yt(n,t,e){var r;if(t=a.createCallback(t,e),Z(n)){e=-1;
for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else be(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function mt(n){for(var t=-1,e=n?n.length:0,r=Gt.apply(zt,le.call(arguments,1)),r=F(r),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u}function dt(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return H(n,0,oe(ae(0,r),u))}}function bt(n,t,e,r){var u=-1,o=n?n.length:0,i=[];for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),Z(r)?Wt.apply(i,t?r:bt(r)):i.push(r);
return i}function _t(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?ae(0,u+e):e||0)-1;else if(e)return r=Ct(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function wt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:ae(0,t);return H(n,r)}function Ct(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):Et,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function jt(n,t,e,r){var u=-1,o=n?n.length:0,i=[],c=i;
typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var p=!t&&o>=l;if(p)var s={};for(null!=e&&(c=[],e=a.createCallback(e,r));++u<o;){r=n[u];var v=e?e(r,u,n):r;if(p)var g=f+v,g=s[g]?!(c=s[g]):c=s[g]=[];(t?!u||c[c.length-1]!==v:g||0>_t(c,v))&&((e||p)&&c.push(v),i.push(r))}return i}function kt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];t?u[a]=t[e]:u[a[0]]=a[1]}return u}function xt(n,t){return ve.fastBind||ne&&2<arguments.length?ne.call.apply(ne,arguments):D(n,t,le.call(arguments,2))}function Ot(n){var t=le.call(arguments,1);
return Yt(function(){n.apply(e,t)},1)}function Et(n){return n}function St(n){pt(X(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Wt.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:new U(t)}})}function At(){return this.__wrapped__}r=r?B.defaults(n.Object(),r,B.pick(n,w)):n;var It=r.Array,Pt=r.Boolean,Nt=r.Date,$t=r.Function,qt=r.Math,Bt=r.Number,Ft=r.Object,Rt=r.RegExp,Tt=r.String,Dt=r.TypeError,zt=It(),Lt=Ft(),Kt=r._,Mt=Rt("^"+Tt(Lt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Ut=qt.ceil,Vt=r.clearTimeout,Gt=zt.concat,Ht=qt.floor,Jt=Mt.test(Jt=Ft.getPrototypeOf)&&Jt,Qt=Lt.hasOwnProperty,Wt=zt.push,Xt=r.setImmediate,Yt=r.setTimeout,Zt=Lt.toString,ne=Mt.test(ne=Zt.bind)&&ne,te=Mt.test(te=It.isArray)&&te,ee=r.isFinite,re=r.isNaN,ue=Mt.test(ue=Ft.keys)&&ue,ae=qt.max,oe=qt.min,ie=r.parseInt,fe=qt.random,le=zt.slice,ce=Mt.test(r.attachEvent),pe=ne&&!/\n|true/.test(ne+ce),se={};
se[k]=It,se[x]=Pt,se[O]=Nt,se[A]=Ft,se[S]=Bt,se[I]=Rt,se[P]=Tt;var ve=a.support={};(function(){var n=function(){this.x=1},t={0:1,length:1},e=[];n.prototype={valueOf:1,y:1};for(var r in new n)e.push(r);for(r in arguments);ve.argsObject=arguments.constructor==Ft&&!(arguments instanceof It),ve.argsClass=Q(arguments),ve.enumPrototypes=n.propertyIsEnumerable("prototype"),ve.fastBind=ne&&!pe,ve.ownLast="x"!=e[0],ve.nonEnumArgs=0!=r,ve.nonEnumShadows=!/valueOf/.test(e),ve.spliceObjects=(zt.splice.call(t,0,1),!t[0]),ve.unindexedChars="xx"!="x"[0]+Ft("x")[0];
try{ve.nodeClass=!(Zt.call(document)==A&&!({toString:0}+""))}catch(u){ve.nodeClass=!0}})(1),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:y,variable:"",imports:{_:a}};var ge={a:"q,w,g",h:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",f:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},he={a:"e,d,x",h:"d=d&&typeof x=='undefined'?d:p.createCallback(d,x)",b:"typeof n=='number'",f:"if(d(m[i],i,e)===false)return u"},ye={h:"if(!r[typeof m])return u;"+he.h,b:!1};
U.prototype=a.prototype,ve.argsClass||(Q=function(n){return n?Qt.call(n,"callee"):!1});var me=z({a:"q",e:"[]",h:"if(!(r[typeof q]))return u",f:"u.push(i)",b:!1}),de=ue?function(n){return et(n)?ve.enumPrototypes&&typeof n=="function"||ve.nonEnumArgs&&n.length&&Q(n)?me(n):ue(n):[]}:me,be=z(he),_e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},we=Y(_e),Ce=z(ge,{h:ge.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=p.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),f:"u[i]=d?d(u[i],m[i]):m[i]"}),je=z(ge),ke=z(he,ye,{i:!1}),xe=z(he,ye);
tt(/x/)&&(tt=function(n){return n instanceof $t||Zt.call(n)==E});var Oe=Jt?function(n){if(!n||Zt.call(n)!=A||!ve.argsClass&&Q(n))return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Jt(t))&&Jt(e);return e?n==e||Jt(n)==e:G(n)}:G;pe&&u&&typeof Xt=="function"&&(Ot=xt(Xt,r));var Ee=8==ie("08")?ie:function(n,t){return ie(ut(n)?n.replace(m,""):n,t||0)};return a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=Ce,a.at=function(n){var t=-1,e=Gt.apply(zt,le.call(arguments,1)),r=e.length,u=It(r);
for(ve.unindexedChars&&ut(n)&&(n=n.split(""));++t<r;)u[t]=n[e[t]];return u},a.bind=xt,a.bindAll=function(n){for(var t=1<arguments.length?Gt.apply(zt,le.call(arguments,1)):X(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=xt(n[u],n)}return n},a.bindKey=function(n,t){return D(n,t,le.call(arguments,2),i)},a.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];
return t[0]}},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),pt(n,function(n,e,u){e=Tt(t(n,e,u)),Qt.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=function(n,t,e){if(null==n)return Et;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=de(n);return function(t){for(var e=u.length,r=!1;e--&&(r=nt(t[u[e]],n[u[e]],i)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)
}:function(e,r,u){return n.call(t,e,r,u)}:n},a.debounce=function(n,t,e){function r(){i=null,f&&(a=n.apply(o,u))}var u,a,o,i,f=!0;if(!0===e)var l=!0,f=!1;else e&&$[typeof e]&&(l=e.leading,f="trailing"in e?e.trailing:f);return function(){var e=l&&!i;return u=arguments,o=this,Vt(i),i=Yt(r,t),e&&(a=n.apply(o,u)),a}},a.defaults=je,a.defer=Ot,a.delay=function(n,t){var r=le.call(arguments,2);return Yt(function(){n.apply(e,r)},t)},a.difference=mt,a.filter=lt,a.flatten=bt,a.forEach=pt,a.forIn=ke,a.forOwn=xe,a.functions=X,a.groupBy=function(n,t,e){var r={};
return t=a.createCallback(t,e),pt(n,function(n,e,u){e=Tt(t(n,e,u)),(Qt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return H(n,0,oe(ae(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=a>=l,i=[],c=i;n:for(;++u<a;){var p=n[u];if(o)var s=f+p,s=r[0][s]?!(c=r[0][s]):c=r[0][s]=[];if(s||0>_t(c,p)){o&&c.push(p);
for(var v=e;--v;)if(!(r[v]||(r[v]=F(t[v])))(p))continue n;i.push(p)}}return i},a.invert=Y,a.invoke=function(n,t){var e=le.call(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=It(typeof a=="number"?a:0);return pt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=de,a.map=st,a.max=vt,a.memoize=function(n,t){var e={};return function(){var r=f+(t?t.apply(this,arguments):arguments[0]);return Qt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=at,a.min=function(n,t,e){var r=1/0,u=r;
if(!t&&Z(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&ut(n)?R:a.createCallback(t,e),be(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=a.createCallback(t,e);else var o=Gt.apply(zt,le.call(arguments,1));return ke(n,function(n,e,a){(r?!t(n,e,a):0>_t(o,e))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=de(n),r=e.length,u=It(r);++t<r;){var a=e[t];
u[t]=[a,n[a]]}return u},a.partial=function(n){return D(n,le.call(arguments,1))},a.partialRight=function(n){return D(n,le.call(arguments,1),null,i)},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,o=Gt.apply(zt,le.call(arguments,1)),i=et(n)?o.length:0;++u<i;){var f=o[u];f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),ke(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=st,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=ae(0,Ut((t-n)/e));for(var u=It(t);++r<t;)u[r]=n,n+=e;
return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),lt(n,function(n,e,r){return!t(n,e,r)})},a.rest=wt,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=It(typeof e=="number"?e:0);return pt(n,function(n){var e=Ht(fe()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=It(typeof u=="number"?u:0);for(t=a.createCallback(t,e),pt(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(T);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t,e){function r(){f=new Nt,i=null,c&&(a=n.apply(o,u))
}var u,a,o,i,f=0,l=!0,c=!0;return!1===e?l=!1:e&&$[typeof e]&&(l="leading"in e?e.leading:l,c="trailing"in e?e.trailing:c),function(){var e=new Nt;!i&&!l&&(f=e);var c=t-(e-f);return u=arguments,o=this,0<c?i||(i=Yt(r,c)):(Vt(i),i=null,f=e,a=n.apply(o,u)),a}},a.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=It(n);for(t=a.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?ve.unindexedChars&&ut(n)?n.split(""):H(n):ot(n)},a.union=function(n){return Z(n)||(arguments[0]=n?le.call(n):zt),jt(Gt.apply(zt,arguments))
},a.uniq=jt,a.unzip=function(n){for(var t=-1,e=n?n.length:0,r=e?vt(st(n,"length")):0,u=It(r);++t<e;)for(var a=-1,o=n[t];++a<r;)(u[a]||(u[a]=It(e)))[t]=o[a];return u},a.values=ot,a.where=lt,a.without=function(n){return mt(n,le.call(arguments,1))},a.wrap=function(n,t){return function(){var e=[n];return Wt.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?vt(st(arguments,"length")):0,r=It(e);++t<e;)r[t]=st(arguments,t);return r},a.zipObject=kt,a.collect=st,a.drop=wt,a.each=pt,a.extend=Ce,a.methods=X,a.object=kt,a.select=lt,a.tail=wt,a.unique=jt,St(a),a.clone=W,a.cloneDeep=function(n,t,e){return W(n,!0,t,e)
},a.contains=it,a.escape=function(n){return null==n?"":Tt(n).replace(b,K)},a.every=ft,a.find=ct,a.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=a.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},a.findKey=function(n,t,e){var r;return t=a.createCallback(t,e),xe(n,function(n,e,u){return t(n,e,u)?(r=e,!1):void 0}),r},a.has=function(n,t){return n?Qt.call(n,t):!1},a.identity=Et,a.indexOf=_t,a.isArguments=Q,a.isArray=Z,a.isBoolean=function(n){return!0===n||!1===n||Zt.call(n)==x},a.isDate=function(n){return n instanceof Nt||Zt.call(n)==O
},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Zt.call(n),r=n.length;return e==k||e==P||(ve.argsClass?e==j:Q(n))||e==A&&typeof r=="number"&&tt(n.splice)?!r:(xe(n,function(){return t=!1}),t)},a.isEqual=nt,a.isFinite=function(n){return ee(n)&&!re(parseFloat(n))},a.isFunction=tt,a.isNaN=function(n){return rt(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=rt,a.isObject=et,a.isPlainObject=Oe,a.isRegExp=function(n){return n instanceof Rt||Zt.call(n)==I
},a.isString=ut,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ae(0,r+e):oe(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=St,a.noConflict=function(){return r._=Kt,this},a.parseInt=Ee,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Ht(fe()*((+t||0)-n+1))},a.reduce=gt,a.reduceRight=ht,a.result=function(n,t){var r=n?n[t]:e;return tt(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;
return typeof t=="number"?t:de(n).length},a.some=yt,a.sortedIndex=Ct,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=je({},r,u);var o,i=je({},r.imports,u.imports),u=de(i),i=ot(i),f=0,l=r.interpolate||d,v="__p+='",l=Rt((r.escape||d).source+"|"+l.source+"|"+(l===y?g:d).source+"|"+(r.evaluate||d).source+"|$","g");n.replace(l,function(t,e,r,u,a,i){return r||(r=u),v+=n.slice(f,i).replace(_,L),e&&(v+="'+__e("+e+")+'"),a&&(o=!0,v+="';"+a+";__p+='"),r&&(v+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t
}),v+="';\n",l=r=r.variable,l||(r="obj",v="with("+r+"){"+v+"}"),v=(o?v.replace(c,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+r+"){"+(l?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}";try{var h=$t(u,"return "+v).apply(e,i)}catch(m){throw m.source=v,m}return t?h(t):(h.source=v,h)},a.unescape=function(n){return null==n?"":Tt(n).replace(v,J)},a.uniqueId=function(n){var t=++o;return Tt(null==n?"":n)+t
},a.all=ft,a.any=yt,a.detect=ct,a.foldl=gt,a.foldr=ht,a.include=it,a.inject=gt,xe(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Wt.apply(t,arguments),n.apply(a,t)})}),a.first=dt,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[u-1];return H(n,ae(0,u-r))}},a.take=dt,a.head=dt,xe(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);
return null==t||e&&typeof t!="function"?r:new U(r)})}),a.VERSION="1.2.0",a.prototype.toString=function(){return Tt(this.__wrapped__)},a.prototype.value=At,a.prototype.valueOf=At,be(["join","pop","shift"],function(n){var t=zt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),be(["push","reverse","sort","unshift"],function(n){var t=zt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),be(["concat","slice","splice"],function(n){var t=zt[n];a.prototype[n]=function(){return new U(t.apply(this.__wrapped__,arguments))
}}),ve.spliceObjects||be(["pop","shift","splice"],function(n){var t=zt[n],e="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,r=t.apply(n,arguments);return 0===n.length&&delete n[0],e?new U(r):r}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;(a.global===a||a.window===a)&&(n=a);var o=0,i={},f=+new Date+"",l=200,c=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,v=/&(?:amp|lt|gt|quot|#39);/g,g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/\w*$/,y=/<%=([\s\S]+?)%>/g,m=/^0+(?=.$)/,d=/($^)/,b=/[&<>"']/g,_=/['\n\r\t\u2028\u2029\\]/g,w="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),C="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),j="[object Arguments]",k="[object Array]",x="[object Boolean]",O="[object Date]",E="[object Function]",S="[object Number]",A="[object Object]",I="[object RegExp]",P="[object String]",N={};
N[E]=!1,N[j]=N[k]=N[x]=N[O]=N[S]=N[A]=N[I]=N[P]=!0;var $={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},q={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},B=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=B,define(function(){return B})):r&&!r.nodeType?u?(u.exports=B)._=B:r._=B:n._=B})(this);

5238
dist/lodash.js vendored

File diff suppressed because it is too large Load Diff

44
dist/lodash.min.js vendored
View File

@@ -1,44 +0,0 @@
/**
* @license
* Lo-Dash 1.2.0 (Custom Build) lodash.com/license
* Build: `lodash modern -o ./dist/lodash.js`
* Underscore.js 1.4.4 underscorejs.org/LICENSE
*/
;(function(n){function t(o){function f(n){if(!n||ue.call(n)!=S)return a;var t=n.valueOf,e=typeof t=="function"&&(e=Zt(t))&&Zt(e);return e?n==e||Zt(n)==e:X(n)}function q(n,t,e){if(!n||!F[typeof n])return n;t=t&&typeof e=="undefined"?t:M.createCallback(t,e);for(var r=-1,u=F[typeof n]?me(n):[],o=u.length;++r<o&&(e=u[r],!(t(n[e],e,n)===a)););return n}function D(n,t,e){var r;if(!n||!F[typeof n])return n;t=t&&typeof e=="undefined"?t:M.createCallback(t,e);for(r in n)if(t(n[r],r,n)===a)break;return n}function z(n,t,e){var r,u=n,a=u;
if(!u)return a;for(var o=arguments,i=0,f=typeof e=="number"?2:o.length;++i<f;)if((u=o[i])&&F[typeof u]){var c=u.length;if(r=-1,rt(u))for(;++r<c;)"undefined"==typeof a[r]&&(a[r]=u[r]);else for(var l=-1,p=F[typeof u]?me(u):[],c=p.length;++l<c;)r=p[l],"undefined"==typeof a[r]&&(a[r]=u[r])}return a}function P(n,t,e){var r,u=n,a=u;if(!u)return a;var o=arguments,i=0,f=typeof e=="number"?2:o.length;if(3<f&&"function"==typeof o[f-2])var c=M.createCallback(o[--f-1],o[f--],2);else 2<f&&"function"==typeof o[f-1]&&(c=o[--f]);
for(;++i<f;)if((u=o[i])&&F[typeof u]){var l=u.length;if(r=-1,rt(u))for(;++r<l;)a[r]=c?c(a[r],u[r]):u[r];else for(var p=-1,s=F[typeof u]?me(u):[],l=s.length;++p<l;)r=s[p],a[r]=c?c(a[r],u[r]):u[r]}return a}function K(n){var t,e=[];if(!n||!F[typeof n])return e;for(t in n)ne.call(n,t)&&e.push(t);return e}function M(n){return n&&typeof n=="object"&&!rt(n)&&ne.call(n,"__wrapped__")?n:new Q(n)}function U(n){var t=n.length,e=t>=s;if(e)for(var r={},u=-1;++u<t;){var a=p+n[u];(r[a]||(r[a]=[])).push(n[u])}return function(t){if(e){var u=p+t;
return r[u]&&-1<xt(r[u],t)}return-1<xt(n,t)}}function V(n){return n.charCodeAt(0)}function G(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function H(n,t,e,r){function a(){var r=arguments,l=i?this:t;return o||(n=t[f]),e.length&&(r=r.length?(r=ge.call(r),c?r.concat(e):e.concat(r)):e),this instanceof a?(W.prototype=n.prototype,l=new W,W.prototype=u,r=n.apply(l,r),ot(r)?r:l):n.apply(l,r)}var o=at(n),i=!e,f=t;if(i){var c=r;
e=t}else if(!o){if(!r)throw new Vt;t=n}return a}function J(n){return"\\"+R[n]}function L(n){return be[n]}function Q(n){this.__wrapped__=n}function W(){}function X(n){var t=a;if(!n||ue.call(n)!=S)return t;var e=n.constructor;return(at(e)?e instanceof e:he.nodeClass||!isNode(n))?(D(n,function(n,e){t=e}),t===a||ne.call(n,t)):t}function Y(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Rt(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function Z(n){return de[n]}function nt(n,t,r,u,o,i){var f=n;
if(typeof t=="function"&&(u=r,r=t,t=a),typeof r=="function"){if(r=typeof u=="undefined"?r:M.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;f=n}if(u=ot(f)){var c=ue.call(f);if(!B[c])return f;var l=rt(f)}if(!u||!t)return u?l?Y(f):P({},f):f;switch(u=ye[c],c){case N:case E:return new u(+f);case I:case $:return new u(f);case A:return u(f.source,b.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(ne.call(n,"index")&&(f.index=n.index),ne.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?yt:q)(n,function(n,u){f[u]=nt(n,t,r,e,o,i)
}),f}function tt(n){var t=[];return D(n,function(n,e){at(n)&&t.push(e)}),t.sort()}function et(n){for(var t=-1,e=me(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function rt(n){return n instanceof Rt||oe(n)}function ut(n,t,e,o,i,f){var c=e===l;if(typeof e=="function"&&!c){e=M.createCallback(e,o,2);var p=e(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return a;
if(n==u||t==u)return n===t;if(v=ue.call(n),s=ue.call(t),v==x&&(v=S),s==x&&(s=S),v!=s)return a;switch(v){case N:case E:return+n==+t;case I:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case A:case $:return n==Ut(t)}if(s=v==O,!s){if(ne.call(n,"__wrapped__")||ne.call(t,"__wrapped__"))return ut(n.__wrapped__||n,t.__wrapped__||t,e,o,i,f);if(v!=S)return a;var v=n.constructor,g=t.constructor;if(v!=g&&(!at(v)||!(v instanceof v&&at(g)&&g instanceof g)))return a}for(i||(i=[]),f||(f=[]),v=i.length;v--;)if(i[v]==n)return f[v]==t;
var y=0,p=r;if(i.push(n),f.push(t),s){if(v=n.length,y=t.length,p=y==n.length,!p&&!c)return p;for(;y--;)if(s=v,g=t[y],c)for(;s--&&!(p=ut(n[s],g,e,o,i,f)););else if(!(p=ut(n[y],g,e,o,i,f)))break;return p}return D(t,function(t,r,u){return ne.call(u,r)?(y++,p=ne.call(n,r)&&ut(n[r],t,e,o,i,f)):void 0}),p&&!c&&D(n,function(n,t,e){return ne.call(e,t)?p=-1<--y:void 0}),p}function at(n){return typeof n=="function"}function ot(n){return n?F[typeof n]:a}function it(n){return typeof n=="number"||ue.call(n)==I}function ft(n){return typeof n=="string"||ue.call(n)==$
}function ct(n,t,e){var r=arguments,u=0,a=2;if(!ot(n))return n;if(e===l)var o=r[3],i=r[4],c=r[5];else i=[],c=[],typeof e!="number"&&(a=r.length),3<a&&"function"==typeof r[a-2]?o=M.createCallback(r[--a-1],r[a--],2):2<a&&"function"==typeof r[a-1]&&(o=r[--a]);for(;++u<a;)(rt(r[u])?yt:q)(r[u],function(t,e){var r,u,a=t,p=n[e];if(t&&((u=rt(t))||f(t))){for(a=i.length;a--;)if(r=i[a]==t){p=c[a];break}if(!r){var s;o&&(a=o(p,t),s=typeof a!="undefined")&&(p=a),s||(p=u?rt(p)?p:[]:f(p)?p:{}),i.push(t),c.push(p),s||(p=ct(p,t,l,o,i,c))
}}else o&&(a=o(p,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(p=a);n[e]=p});return n}function lt(n){for(var t=-1,e=me(n),r=e.length,u=Rt(r);++t<r;)u[t]=n[e[t]];return u}function pt(n,t,e){var r=-1,u=n?n.length:0,o=a;return e=(0>e?le(0,u+e):e)||0,typeof u=="number"?o=-1<(ft(n)?n.indexOf(t,e):xt(n,t,e)):q(n,function(n){return++r<e?void 0:!(o=n===t)}),o}function st(n,t,e){var u=r;t=M.createCallback(t,e),e=-1;var a=n?n.length:0;if(typeof a=="number")for(;++e<a&&(u=!!t(n[e],e,n)););else q(n,function(n,e,r){return u=!!t(n,e,r)
});return u}function vt(n,t,e){var r=[];t=M.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var a=n[e];t(a,e,n)&&r.push(a)}else q(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function gt(n,t,e){t=M.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return q(n,function(n,e,r){return t(n,e,r)?(u=n,a):void 0}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function yt(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:M.createCallback(t,e),typeof u=="number")for(;++r<u&&t(n[r],r,n)!==a;);else q(n,t);
return n}function ht(n,t,e){var r=-1,u=n?n.length:0;if(t=M.createCallback(t,e),typeof u=="number")for(var a=Rt(u);++r<u;)a[r]=t(n[r],r,n);else a=[],q(n,function(n,e,u){a[++r]=t(n,e,u)});return a}function mt(n,t,e){var r=-1/0,u=r;if(!t&&rt(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o>u&&(u=o)}}else t=!t&&ft(n)?V:M.createCallback(t,e),yt(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function bt(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=Rt(r);++e<r;)u[e]=n[e][t];return u||ht(n,t)
}function dt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=M.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else q(n,function(n,r,o){e=u?(u=a,n):t(e,n,r,o)});return e}function _t(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=me(n),u=i.length;return t=M.createCallback(t,r,4),yt(n,function(r,f,c){f=i?i[--u]:--u,e=o?(o=a,n[f]):t(e,n[f],f,c)}),e}function kt(n,t,e){var r;t=M.createCallback(t,e),e=-1;var u=n?n.length:0;
if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else q(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function wt(n){for(var t=-1,e=n?n.length:0,r=Xt.apply(Gt,ge.call(arguments,1)),r=U(r),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u}function Ct(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=-1;for(t=M.createCallback(t,e);++o<a&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[0];return Y(n,0,pe(le(0,r),a))}}function jt(n,t,e,r){var o=-1,i=n?n.length:0,f=[];for(typeof t!="boolean"&&t!=u&&(r=e,e=t,t=a),e!=u&&(e=M.createCallback(e,r));++o<i;)r=n[o],e&&(r=e(r,o,n)),rt(r)?te.apply(f,t?r:jt(r)):f.push(r);
return f}function xt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?le(0,u+e):e||0)-1;else if(e)return r=Nt(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function Ot(n,t,e){if(typeof t!="number"&&t!=u){var r=0,a=-1,o=n?n.length:0;for(t=M.createCallback(t,e);++a<o&&t(n[a],a,n);)r++}else r=t==u||e?1:le(0,t);return Y(n,r)}function Nt(n,t,e,r){var u=0,a=n?n.length:u;for(e=e?M.createCallback(e,r,1):$t,t=e(t);u<a;)r=u+a>>>1,e(n[r])<t?u=r+1:a=r;return u}function Et(n,t,e,r){var o=-1,i=n?n.length:0,f=[],c=f;
typeof t!="boolean"&&t!=u&&(r=e,e=t,t=a);var l=!t&&i>=s;if(l)var v={};for(e!=u&&(c=[],e=M.createCallback(e,r));++o<i;){r=n[o];var g=e?e(r,o,n):r;if(l)var y=p+g,y=v[y]?!(c=v[y]):c=v[y]=[];(t?!o||c[c.length-1]!==g:y||0>xt(c,g))&&((e||l)&&c.push(g),f.push(r))}return f}function It(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];t?u[a]=t[e]:u[a[0]]=a[1]}return u}function St(n,t){return he.fastBind||ae&&2<arguments.length?ae.call.apply(ae,arguments):H(n,t,ge.call(arguments,2))}function At(n){var t=ge.call(arguments,1);
return re(function(){n.apply(e,t)},1)}function $t(n){return n}function Bt(n){yt(tt(n),function(t){var e=M[t]=n[t];M.prototype[t]=function(){var n=this.__wrapped__,t=[n];return te.apply(t,arguments),t=e.apply(M,t),n&&typeof n=="object"&&n==t?this:new Q(t)}})}function Ft(){return this.__wrapped__}o=o?T.defaults(n.Object(),o,T.pick(n,j)):n;var Rt=o.Array,Tt=o.Boolean,qt=o.Date,Dt=o.Function,zt=o.Math,Pt=o.Number,Kt=o.Object,Mt=o.RegExp,Ut=o.String,Vt=o.TypeError,Gt=Rt(),Ht=Kt(),Jt=o._,Lt=Mt("^"+Ut(Ht.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Qt=zt.ceil,Wt=o.clearTimeout,Xt=Gt.concat,Yt=zt.floor,Zt=Lt.test(Zt=Kt.getPrototypeOf)&&Zt,ne=Ht.hasOwnProperty,te=Gt.push,ee=o.setImmediate,re=o.setTimeout,ue=Ht.toString,ae=Lt.test(ae=ue.bind)&&ae,oe=Lt.test(oe=Rt.isArray)&&oe,ie=o.isFinite,fe=o.isNaN,ce=Lt.test(ce=Kt.keys)&&ce,le=zt.max,pe=zt.min,se=o.parseInt,ve=zt.random,ge=Gt.slice,zt=Lt.test(o.attachEvent),zt=ae&&!/\n|true/.test(ae+zt),ye={};
ye[O]=Rt,ye[N]=Tt,ye[E]=qt,ye[S]=Kt,ye[I]=Pt,ye[A]=Mt,ye[$]=Ut;var he=M.support={};he.fastBind=ae&&!zt,M.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:M}},Q.prototype=M.prototype;var me=ce?function(n){return ot(n)?ce(n):[]}:K,be={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},de=et(be);return zt&&i&&typeof ee=="function"&&(At=St(ee,o)),Tt=8==se("08")?se:function(n,t){return se(ft(n)?n.replace(_,""):n,t||0)},M.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
}},M.assign=P,M.at=function(n){for(var t=-1,e=Xt.apply(Gt,ge.call(arguments,1)),r=e.length,u=Rt(r);++t<r;)u[t]=n[e[t]];return u},M.bind=St,M.bindAll=function(n){for(var t=1<arguments.length?Xt.apply(Gt,ge.call(arguments,1)):tt(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=St(n[u],n)}return n},M.bindKey=function(n,t){return H(n,t,ge.call(arguments,2),l)},M.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},M.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];
return t[0]}},M.countBy=function(n,t,e){var r={};return t=M.createCallback(t,e),yt(n,function(n,e,u){e=Ut(t(n,e,u)),ne.call(r,e)?r[e]++:r[e]=1}),r},M.createCallback=function(n,t,e){if(n==u)return $t;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var o=me(n);return function(t){for(var e=o.length,r=a;e--&&(r=ut(t[o[e]],n[o[e]],l)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)
}:function(e,r,u){return n.call(t,e,r,u)}:n},M.debounce=function(n,t,e){function o(){l=u,p&&(f=n.apply(c,i))}var i,f,c,l,p=r;if(e===r)var s=r,p=a;else e&&F[typeof e]&&(s=e.leading,p="trailing"in e?e.trailing:p);return function(){var e=s&&!l;return i=arguments,c=this,Wt(l),l=re(o,t),e&&(f=n.apply(c,i)),f}},M.defaults=z,M.defer=At,M.delay=function(n,t){var r=ge.call(arguments,2);return re(function(){n.apply(e,r)},t)},M.difference=wt,M.filter=vt,M.flatten=jt,M.forEach=yt,M.forIn=D,M.forOwn=q,M.functions=tt,M.groupBy=function(n,t,e){var r={};
return t=M.createCallback(t,e),yt(n,function(n,e,u){e=Ut(t(n,e,u)),(ne.call(r,e)?r[e]:r[e]=[]).push(n)}),r},M.initial=function(n,t,e){if(!n)return[];var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=M.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=t==u||e?1:t||r;return Y(n,0,pe(le(0,a-r),a))},M.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=a>=s,i=[],f=i;n:for(;++u<a;){var c=n[u];if(o)var l=p+c,l=r[0][l]?!(f=r[0][l]):f=r[0][l]=[];if(l||0>xt(f,c)){o&&f.push(c);
for(var v=e;--v;)if(!(r[v]||(r[v]=U(t[v])))(c))continue n;i.push(c)}}return i},M.invert=et,M.invoke=function(n,t){var e=ge.call(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Rt(typeof a=="number"?a:0);return yt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},M.keys=me,M.map=ht,M.max=mt,M.memoize=function(n,t){var e={};return function(){var r=p+(t?t.apply(this,arguments):arguments[0]);return ne.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},M.merge=ct,M.min=function(n,t,e){var r=1/0,u=r;
if(!t&&rt(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o<u&&(u=o)}}else t=!t&&ft(n)?V:M.createCallback(t,e),yt(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},M.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=M.createCallback(t,e);else var a=Xt.apply(Gt,ge.call(arguments,1));return D(n,function(n,e,o){(r?!t(n,e,o):0>xt(a,e))&&(u[e]=n)}),u},M.once=function(n){var t,e;return function(){return t?e:(t=r,e=n.apply(this,arguments),n=u,e)}},M.pairs=function(n){for(var t=-1,e=me(n),r=e.length,u=Rt(r);++t<r;){var a=e[t];
u[t]=[a,n[a]]}return u},M.partial=function(n){return H(n,ge.call(arguments,1))},M.partialRight=function(n){return H(n,ge.call(arguments,1),u,l)},M.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,a=Xt.apply(Gt,ge.call(arguments,1)),o=ot(n)?a.length:0;++u<o;){var i=a[u];i in n&&(r[i]=n[i])}else t=M.createCallback(t,e),D(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},M.pluck=bt,M.range=function(n,t,e){n=+n||0,e=+e||1,t==u&&(t=n,n=0);var r=-1;t=le(0,Qt((t-n)/e));for(var a=Rt(t);++r<t;)a[r]=n,n+=e;
return a},M.reject=function(n,t,e){return t=M.createCallback(t,e),vt(n,function(n,e,r){return!t(n,e,r)})},M.rest=Ot,M.shuffle=function(n){var t=-1,e=n?n.length:0,r=Rt(typeof e=="number"?e:0);return yt(n,function(n){var e=Yt(ve()*(++t+1));r[t]=r[e],r[e]=n}),r},M.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,a=Rt(typeof u=="number"?u:0);for(t=M.createCallback(t,e),yt(n,function(n,e,u){a[++r]={a:t(n,e,u),b:r,c:n}}),u=a.length,a.sort(G);u--;)a[u]=a[u].c;return a},M.tap=function(n,t){return t(n),n},M.throttle=function(n,t,e){function o(){p=new qt,l=u,v&&(f=n.apply(c,i))
}var i,f,c,l,p=0,s=r,v=r;return e===a?s=a:e&&F[typeof e]&&(s="leading"in e?e.leading:s,v="trailing"in e?e.trailing:v),function(){var e=new qt;!l&&!s&&(p=e);var r=t-(e-p);return i=arguments,c=this,0<r?l||(l=re(o,r)):(Wt(l),l=u,p=e,f=n.apply(c,i)),f}},M.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Rt(n);for(t=M.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},M.toArray=function(n){return n&&typeof n.length=="number"?Y(n):lt(n)},M.union=function(n){return rt(n)||(arguments[0]=n?ge.call(n):Gt),Et(Xt.apply(Gt,arguments))
},M.uniq=Et,M.unzip=function(n){for(var t=-1,e=n?n.length:0,r=e?mt(bt(n,"length")):0,u=Rt(r);++t<e;)for(var a=-1,o=n[t];++a<r;)(u[a]||(u[a]=Rt(e)))[t]=o[a];return u},M.values=lt,M.where=vt,M.without=function(n){return wt(n,ge.call(arguments,1))},M.wrap=function(n,t){return function(){var e=[n];return te.apply(e,arguments),t.apply(this,e)}},M.zip=function(n){for(var t=-1,e=n?mt(bt(arguments,"length")):0,r=Rt(e);++t<e;)r[t]=bt(arguments,t);return r},M.zipObject=It,M.collect=ht,M.drop=Ot,M.each=yt,M.extend=P,M.methods=tt,M.object=It,M.select=vt,M.tail=Ot,M.unique=Et,Bt(M),M.clone=nt,M.cloneDeep=function(n,t,e){return nt(n,r,t,e)
},M.contains=pt,M.escape=function(n){return n==u?"":Ut(n).replace(w,L)},M.every=st,M.find=gt,M.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=M.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},M.findKey=function(n,t,e){var r;return t=M.createCallback(t,e),q(n,function(n,e,u){return t(n,e,u)?(r=e,a):void 0}),r},M.has=function(n,t){return n?ne.call(n,t):a},M.identity=$t,M.indexOf=xt,M.isArguments=function(n){return ue.call(n)==x},M.isArray=rt,M.isBoolean=function(n){return n===r||n===a||ue.call(n)==N
},M.isDate=function(n){return n instanceof qt||ue.call(n)==E},M.isElement=function(n){return n?1===n.nodeType:a},M.isEmpty=function(n){var t=r;if(!n)return t;var e=ue.call(n),u=n.length;return e==O||e==$||e==x||e==S&&typeof u=="number"&&at(n.splice)?!u:(q(n,function(){return t=a}),t)},M.isEqual=ut,M.isFinite=function(n){return ie(n)&&!fe(parseFloat(n))},M.isFunction=at,M.isNaN=function(n){return it(n)&&n!=+n},M.isNull=function(n){return n===u},M.isNumber=it,M.isObject=ot,M.isPlainObject=f,M.isRegExp=function(n){return n instanceof Mt||ue.call(n)==A
},M.isString=ft,M.isUndefined=function(n){return typeof n=="undefined"},M.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?le(0,r+e):pe(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},M.mixin=Bt,M.noConflict=function(){return o._=Jt,this},M.parseInt=Tt,M.random=function(n,t){return n==u&&t==u&&(t=1),n=+n||0,t==u&&(t=n,n=0),n+Yt(ve()*((+t||0)-n+1))},M.reduce=dt,M.reduceRight=_t,M.result=function(n,t){var r=n?n[t]:e;return at(r)?n[t]():r},M.runInContext=t,M.size=function(n){var t=n?n.length:0;
return typeof t=="number"?t:me(n).length},M.some=kt,M.sortedIndex=Nt,M.template=function(n,t,u){var a=M.templateSettings;n||(n=""),u=z({},u,a);var o,i=z({},u.imports,a.imports),a=me(i),i=lt(i),f=0,c=u.interpolate||k,l="__p+='",c=Mt((u.escape||k).source+"|"+c.source+"|"+(c===d?m:k).source+"|"+(u.evaluate||k).source+"|$","g");n.replace(c,function(t,e,u,a,i,c){return u||(u=a),l+=n.slice(f,c).replace(C,J),e&&(l+="'+__e("+e+")+'"),i&&(o=r,l+="';"+i+";__p+='"),u&&(l+="'+((__t=("+u+"))==null?'':__t)+'"),f=c+t.length,t
}),l+="';\n",c=u=u.variable,c||(u="obj",l="with("+u+"){"+l+"}"),l=(o?l.replace(v,""):l).replace(g,"$1").replace(y,"$1;"),l="function("+u+"){"+(c?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var p=Dt(a,"return "+l).apply(e,i)}catch(s){throw s.source=l,s}return t?p(t):(p.source=l,p)},M.unescape=function(n){return n==u?"":Ut(n).replace(h,Z)},M.uniqueId=function(n){var t=++c;return Ut(n==u?"":n)+t
},M.all=st,M.any=kt,M.detect=gt,M.foldl=dt,M.foldr=_t,M.include=pt,M.inject=dt,q(M,function(n,t){M.prototype[t]||(M.prototype[t]=function(){var t=[this.__wrapped__];return te.apply(t,arguments),n.apply(M,t)})}),M.first=Ct,M.last=function(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=M.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[a-1];return Y(n,le(0,a-r))}},M.take=Ct,M.head=Ct,q(M,function(n,t){M.prototype[t]||(M.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);
return t==u||e&&typeof t!="function"?r:new Q(r)})}),M.VERSION="1.2.0",M.prototype.toString=function(){return Ut(this.__wrapped__)},M.prototype.value=Ft,M.prototype.valueOf=Ft,yt(["join","pop","shift"],function(n){var t=Gt[n];M.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),yt(["push","reverse","sort","unshift"],function(n){var t=Gt[n];M.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),yt(["concat","slice","splice"],function(n){var t=Gt[n];M.prototype[n]=function(){return new Q(t.apply(this.__wrapped__,arguments))
}}),M}var e,r=!0,u=null,a=!1,o=typeof exports=="object"&&exports,i=typeof module=="object"&&module&&module.exports==o&&module,f=typeof global=="object"&&global;(f.global===f||f.window===f)&&(n=f);var c=0,l={},p=+new Date+"",s=200,v=/\b__p\+='';/g,g=/\b(__p\+=)''\+/g,y=/(__e\(.*?\)|\b__t\))\+'';/g,h=/&(?:amp|lt|gt|quot|#39);/g,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,b=/\w*$/,d=/<%=([\s\S]+?)%>/g,_=/^0+(?=.$)/,k=/($^)/,w=/[&<>"']/g,C=/['\n\r\t\u2028\u2029\\]/g,j="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),x="[object Arguments]",O="[object Array]",N="[object Boolean]",E="[object Date]",I="[object Number]",S="[object Object]",A="[object RegExp]",$="[object String]",B={"[object Function]":a};
B[x]=B[O]=B[N]=B[E]=B[I]=B[S]=B[A]=B[$]=r;var F={"boolean":a,"function":r,object:r,number:a,string:a,undefined:a},R={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},T=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=T,define(function(){return T})):o&&!o.nodeType?i?(i.exports=T)._=T:o._=T:n._=T})(this);

File diff suppressed because it is too large Load Diff

View File

@@ -1,34 +0,0 @@
/**
* @license
* Lo-Dash 1.2.0 (Custom Build) lodash.com/license
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
* Underscore.js 1.4.4 underscorejs.org/LICENSE
*/
;(function(n){function r(n){return n instanceof r?n:new i(n)}function t(n,r){var t=n.b,e=r.b;if(n=n.a,r=r.a,n!==r){if(n>r||typeof n=="undefined")return 1;if(n<r||typeof r=="undefined")return-1}return t<e?-1:1}function e(n,r,t,e){function u(){var e=arguments,c=i?this:r;return o||(n=r[f]),t.length&&(e=e.length?(e=Br.call(e),l?e.concat(t):t.concat(e)):t),this instanceof u?(a.prototype=n.prototype,c=new a,a.prototype=null,e=n.apply(c,e),m(e)?e:c):n.apply(c,e)}var o=y(n),i=!t,f=r;if(i){var l=e;t=r}else if(!o){if(!e)throw new TypeError;
r=n}return u}function u(n){return"\\"+lr[n]}function o(n){return Rr[n]}function i(n){this.__wrapped__=n}function a(){}function f(n){return Dr[n]}function l(n){return dr.call(n)==nr}function c(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]=e[u]}return n}function p(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)null==n[u]&&(n[u]=e[u])}return n}function s(n){var r=[];return Mr(n,function(n,t){y(n)&&r.push(t)
}),r.sort()}function v(n){for(var r=-1,t=Fr(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u}function g(n){if(!n)return!0;if($r(n)||b(n))return!n.length;for(var r in n)if(mr.call(n,r))return!1;return!0}function h(n,t,e,u){if(n===t)return 0!==n||1/n==1/t;var o=typeof n,i=typeof t;if(n===n&&(!n||"function"!=o&&"object"!=o)&&(!t||"function"!=i&&"object"!=i))return!1;if(null==n||null==t)return n===t;if(i=dr.call(n),o=dr.call(t),i!=o)return!1;switch(i){case tr:case er:return+n==+t;case ur:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;
case ir:case ar:return n==t+""}if(o=i==rr,!o){if(n instanceof r||t instanceof r)return h(n.__wrapped__||n,t.__wrapped__||t,e,u);if(i!=or)return!1;var i=n.constructor,a=t.constructor;if(i!=a&&(!y(i)||!(i instanceof i&&y(a)&&a instanceof a)))return!1}for(e||(e=[]),u||(u=[]),i=e.length;i--;)if(e[i]==n)return u[i]==t;var f=!0,l=0;if(e.push(n),u.push(t),o){if(l=t.length,f=l==n.length)for(;l--&&(f=h(n[l],t[l],e,u)););return f}return Mr(t,function(r,t,o){return mr.call(o,t)?(l++,!(f=mr.call(n,t)&&h(n[t],r,e,u))&&K):void 0
}),f&&Mr(n,function(n,r,t){return mr.call(t,r)?!(f=-1<--l)&&K:void 0}),f}function y(n){return typeof n=="function"}function m(n){return n?fr[typeof n]:!1}function _(n){return typeof n=="number"||dr.call(n)==ur}function b(n){return typeof n=="string"||dr.call(n)==ar}function d(n){for(var r=-1,t=Fr(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function j(n,r){var t=!1;return typeof(n?n.length:0)=="number"?t=-1<T(n,r):Tr(n,function(n){return(t=n===r)&&K}),t}function w(n,r,t){var e=!0;r=P(r,t),t=-1;
var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else Tr(n,function(n,t,u){return!(e=!!r(n,t,u))&&K});return e}function A(n,r,t){var e=[];r=P(r,t),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var o=n[t];r(o,t,n)&&e.push(o)}else Tr(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function x(n,r,t){r=P(r,t),t=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return Tr(n,function(n,t,e){return r(n,t,e)?(u=n,K):void 0}),u}for(;++t<e;){var o=n[t];if(r(o,t,n))return o
}}function O(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:P(r,t),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==K;);else Tr(n,r)}function E(n,r,t){var e=-1,u=n?n.length:0;if(r=P(r,t),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],Tr(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function S(n,r,t){var e=-1/0,u=e,o=-1,i=n?n.length:0;if(r||typeof i!="number")r=P(r,t),O(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});else for(;++o<i;)t=n[o],t>u&&(u=t);return u}function N(n,r){var t=-1,e=n?n.length:0;
if(typeof e=="number")for(var u=Array(e);++t<e;)u[t]=n[t][r];return u||E(n,r)}function B(n,r,t,e){if(!n)return t;var u=3>arguments.length;r=P(r,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(t=n[++o]);++o<i;)t=r(t,n[o],o,n);else Tr(n,function(n,e,o){t=u?(u=!1,n):r(t,n,e,o)});return t}function k(n,r,t,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=Fr(n),u=i.length;return r=P(r,e,4),O(n,function(e,a,f){a=i?i[--u]:--u,t=o?(o=!1,n[a]):r(t,n[a],a,f)}),t}function q(n,r,t){var e;
r=P(r,t),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else Tr(n,function(n,t,u){return(e=r(n,t,u))&&K});return!!e}function F(n,r,t){return t&&g(r)?null:(t?x:A)(n,r)}function R(n){for(var r=-1,t=n.length,e=hr.apply(cr,Br.call(arguments,1)),u=[];++r<t;){var o=n[r];0>T(e,o)&&u.push(o)}return u}function D(n,r,t){if(n){var e=0,u=n.length;if(typeof r!="number"&&null!=r){var o=-1;for(r=P(r,t);++o<u&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n[0];return Br.call(n,0,Sr(Er(0,e),u))
}}function M(n,r){for(var t=-1,e=n?n.length:0,u=[];++t<e;){var o=n[t];$r(o)?_r.apply(u,r?o:M(o)):u.push(o)}return u}function T(n,r,t){var e=-1,u=n?n.length:0;if(typeof t=="number")e=(0>t?Er(0,u+t):t||0)-1;else if(t)return e=I(n,r),n[e]===r?e:-1;for(;++e<u;)if(n[e]===r)return e;return-1}function $(n,r,t){if(typeof r!="number"&&null!=r){var e=0,u=-1,o=n?n.length:0;for(r=P(r,t);++u<o&&r(n[u],u,n);)e++}else e=null==r||t?1:Er(0,r);return Br.call(n,e)}function I(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?P(t,e,1):U,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;
return u}function z(n,r,t,e){var u=-1,o=n?n.length:0,i=[],a=i;for(typeof r!="boolean"&&null!=r&&(e=t,t=r,r=!1),null!=t&&(a=[],t=P(t,e));++u<o;){e=n[u];var f=t?t(e,u,n):e;(r?!u||a[a.length-1]!==f:0>T(a,f))&&(t&&a.push(f),i.push(e))}return i}function C(n,r){return qr.fastBind||jr&&2<arguments.length?jr.call.apply(jr,arguments):e(n,r,Br.call(arguments,2))}function P(n,r,t){if(null==n)return U;var e=typeof n;if("function"!=e){if("object"!=e)return function(r){return r[n]};var u=Fr(n);return function(r){for(var t=u.length,e=!1;t--&&(e=r[u[t]]===n[u[t]]););return e
}}return typeof r!="undefined"?1===t?function(t){return n.call(r,t)}:2===t?function(t,e){return n.call(r,t,e)}:4===t?function(t,e,u,o){return n.call(r,t,e,u,o)}:function(t,e,u){return n.call(r,t,e,u)}:n}function U(n){return n}function V(n){O(s(n),function(t){var e=r[t]=n[t];r.prototype[t]=function(){var n=[this.__wrapped__];return _r.apply(n,arguments),n=e.apply(r,n),this.__chain__&&(n=new i(n),n.__chain__=!0),n}})}var W=typeof exports=="object"&&exports,G=typeof module=="object"&&module&&module.exports==W&&module,H=typeof global=="object"&&global;
(H.global===H||H.window===H)&&(n=H);var J=0,K={},L=+new Date+"",Q=/&(?:amp|lt|gt|quot|#39);/g,X=/($^)/,Y=/[&<>"']/g,Z=/['\n\r\t\u2028\u2029\\]/g,nr="[object Arguments]",rr="[object Array]",tr="[object Boolean]",er="[object Date]",ur="[object Number]",or="[object Object]",ir="[object RegExp]",ar="[object String]",fr={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},lr={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},cr=[],H={},pr=n._,sr=RegExp("^"+(H.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),vr=Math.ceil,gr=n.clearTimeout,hr=cr.concat,yr=Math.floor,mr=H.hasOwnProperty,_r=cr.push,br=n.setTimeout,dr=H.toString,jr=sr.test(jr=dr.bind)&&jr,wr=sr.test(wr=Array.isArray)&&wr,Ar=n.isFinite,xr=n.isNaN,Or=sr.test(Or=Object.keys)&&Or,Er=Math.max,Sr=Math.min,Nr=Math.random,Br=cr.slice,H=sr.test(n.attachEvent),kr=jr&&!/\n|true/.test(jr+H),qr={};
(function(){var n={0:1,length:1};qr.argsObject=arguments.constructor==Object&&!(arguments instanceof Array),qr.fastBind=jr&&!kr,qr.spliceObjects=(cr.splice.call(n,0,1),!n[0])})(1),r.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},i.prototype=r.prototype,l(arguments)||(l=function(n){return n?mr.call(n,"callee"):!1});var H=function(n){var r,t=[];if(!n||!fr[typeof n])return t;for(r in n)mr.call(n,r)&&t.push(r);return t},Fr=Or?function(n){return m(n)?Or(n):[]
}:H,Rr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Dr=v(Rr),Mr=function(n,r){var t;if(!n||!fr[typeof n])return n;for(t in n)if(r(n[t],t,n)===K)break;return n},Tr=function(n,r){var t;if(!n||!fr[typeof n])return n;for(t in n)if(mr.call(n,t)&&r(n[t],t,n)===K)break;return n},$r=wr||function(n){return dr.call(n)==rr};y(/x/)&&(y=function(n){return"[object Function]"==dr.call(n)}),r.after=function(n,r){return 1>n?r():function(){return 1>--n?r.apply(this,arguments):void 0}},r.bind=C,r.bindAll=function(n){for(var r=1<arguments.length?hr.apply(cr,Br.call(arguments,1)):s(n),t=-1,e=r.length;++t<e;){var u=r[t];
n[u]=C(n[u],n)}return n},r.compact=function(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];u&&e.push(u)}return e},r.compose=function(){var n=arguments;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},r.countBy=function(n,r,t){var e={};return r=P(r,t),O(n,function(n,t,u){t=r(n,t,u)+"",mr.call(e,t)?e[t]++:e[t]=1}),e},r.debounce=function(n,r,t){function e(){a=null,t||(o=n.apply(i,u))}var u,o,i,a;return function(){var f=t&&!a;return u=arguments,i=this,gr(a),a=br(e,r),f&&(o=n.apply(i,u)),o
}},r.defaults=p,r.defer=function(n){var r=Br.call(arguments,1);return br(function(){n.apply(void 0,r)},1)},r.delay=function(n,r){var t=Br.call(arguments,2);return br(function(){n.apply(void 0,t)},r)},r.difference=R,r.filter=A,r.flatten=M,r.forEach=O,r.functions=s,r.groupBy=function(n,r,t){var e={};return r=P(r,t),O(n,function(n,t,u){t=r(n,t,u)+"",(mr.call(e,t)?e[t]:e[t]=[]).push(n)}),e},r.initial=function(n,r,t){if(!n)return[];var e=0,u=n.length;if(typeof r!="number"&&null!=r){var o=u;for(r=P(r,t);o--&&r(n[o],o,n);)e++
}else e=null==r||t?1:r||e;return Br.call(n,0,Sr(Er(0,u-e),u))},r.intersection=function(n){var r=arguments,t=r.length,e=-1,u=n?n.length:0,o=[];n:for(;++e<u;){var i=n[e];if(0>T(o,i)){for(var a=t;--a;)if(0>T(r[a],i))continue n;o.push(i)}}return o},r.invert=v,r.invoke=function(n,r){var t=Br.call(arguments,2),e=-1,u=typeof r=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return O(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)}),i},r.keys=Fr,r.map=E,r.max=S,r.memoize=function(n,r){var t={};return function(){var e=L+(r?r.apply(this,arguments):arguments[0]);
return mr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},r.min=function(n,r,t){var e=1/0,u=e,o=-1,i=n?n.length:0;if(r||typeof i!="number")r=P(r,t),O(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});else for(;++o<i;)t=n[o],t<u&&(u=t);return u},r.omit=function(n){var r=hr.apply(cr,Br.call(arguments,1)),t={};return Mr(n,function(n,e){0>T(r,e)&&(t[e]=n)}),t},r.once=function(n){var r,t;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},r.pairs=function(n){for(var r=-1,t=Fr(n),e=t.length,u=Array(e);++r<e;){var o=t[r];
u[r]=[o,n[o]]}return u},r.partial=function(n){return e(n,Br.call(arguments,1))},r.pick=function(n){for(var r=-1,t=hr.apply(cr,Br.call(arguments,1)),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},r.pluck=N,r.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=Er(0,vr((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},r.reject=function(n,r,t){return r=P(r,t),A(n,function(n,t,e){return!r(n,t,e)})},r.rest=$,r.shuffle=function(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);
return O(n,function(n){var t=yr(Nr()*(++r+1));e[r]=e[t],e[t]=n}),e},r.sortBy=function(n,r,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(r=P(r,e),O(n,function(n,t,e){i[++u]={a:r(n,t,e),b:u,c:n}}),o=i.length,i.sort(t);o--;)i[o]=i[o].c;return i},r.tap=function(n,r){return r(n),n},r.throttle=function(n,r){function t(){a=new Date,i=null,u=n.apply(o,e)}var e,u,o,i,a=0;return function(){var f=new Date,l=r-(f-a);return e=arguments,o=this,0<l?i||(i=br(t,l)):(gr(i),i=null,a=f,u=n.apply(o,e)),u
}},r.times=function(n,r,t){for(var e=-1,u=Array(-1<n?n:0);++e<n;)u[e]=r.call(t,e);return u},r.toArray=function(n){return $r(n)?Br.call(n):n&&typeof n.length=="number"?E(n):d(n)},r.union=function(n){return $r(n)||(arguments[0]=n?Br.call(n):cr),z(hr.apply(cr,arguments))},r.uniq=z,r.values=d,r.where=F,r.without=function(n){return R(n,Br.call(arguments,1))},r.wrap=function(n,r){return function(){var t=[n];return _r.apply(t,arguments),r.apply(this,t)}},r.zip=function(n){for(var r=-1,t=n?S(N(arguments,"length")):0,e=Array(t);++r<t;)e[r]=N(arguments,r);
return e},r.collect=E,r.drop=$,r.each=O,r.extend=c,r.methods=s,r.object=function(n,r){for(var t=-1,e=n?n.length:0,u={};++t<e;){var o=n[t];r?u[o]=r[t]:u[o[0]]=o[1]}return u},r.select=A,r.tail=$,r.unique=z,r.clone=function(n){return m(n)?$r(n)?Br.call(n):c({},n):n},r.contains=j,r.escape=function(n){return null==n?"":(n+"").replace(Y,o)},r.every=w,r.find=x,r.findWhere=function(n,r){return F(n,r,!0)},r.has=function(n,r){return n?mr.call(n,r):!1},r.identity=U,r.indexOf=T,r.isArguments=l,r.isArray=$r,r.isBoolean=function(n){return!0===n||!1===n||dr.call(n)==tr
},r.isDate=function(n){return dr.call(n)==er},r.isElement=function(n){return n?1===n.nodeType:!1},r.isEmpty=g,r.isEqual=h,r.isFinite=function(n){return Ar(n)&&!xr(parseFloat(n))},r.isFunction=y,r.isNaN=function(n){return _(n)&&n!=+n},r.isNull=function(n){return null===n},r.isNumber=_,r.isObject=m,r.isRegExp=function(n){return dr.call(n)==ir},r.isString=b,r.isUndefined=function(n){return typeof n=="undefined"},r.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Er(0,e+t):Sr(t,e-1))+1);e--;)if(n[e]===r)return e;
return-1},r.mixin=V,r.noConflict=function(){return n._=pr,this},r.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r&&(r=n,n=0),n+yr(Nr()*((+r||0)-n+1))},r.reduce=B,r.reduceRight=k,r.result=function(n,r){var t=n?n[r]:null;return y(t)?n[r]():t},r.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Fr(n).length},r.some=q,r.sortedIndex=I,r.template=function(n,t,e){n||(n=""),e=p({},e,r.templateSettings);var o=0,i="__p+='",a=e.variable;n.replace(RegExp((e.escape||X).source+"|"+(e.interpolate||X).source+"|"+(e.evaluate||X).source+"|$","g"),function(r,t,e,a,f){return i+=n.slice(o,f).replace(Z,u),t&&(i+="'+_['escape']("+t+")+'"),a&&(i+="';"+a+";__p+='"),e&&(i+="'+((__t=("+e+"))==null?'':__t)+'"),o=f+r.length,r
}),i+="';\n",a||(a="obj",i="with("+a+"||{}){"+i+"}"),i="function("+a+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+i+"return __p}";try{var f=Function("_","return "+i)(r)}catch(l){throw l.source=i,l}return t?f(t):(f.source=i,f)},r.unescape=function(n){return null==n?"":(n+"").replace(Q,f)},r.uniqueId=function(n){var r=++J+"";return n?n+r:r},r.all=w,r.any=q,r.detect=x,r.foldl=B,r.foldr=k,r.include=j,r.inject=B,r.first=D,r.last=function(n,r,t){if(n){var e=0,u=n.length;
if(typeof r!="number"&&null!=r){var o=u;for(r=P(r,t);o--&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n[u-1];return Br.call(n,Er(0,u-e))}},r.take=D,r.head=D,r.chain=function(n){return n=new i(n),n.__chain__=!0,n},r.VERSION="1.2.0",V(r),r.prototype.chain=function(){return this.__chain__=!0,this},r.prototype.value=function(){return this.__wrapped__},O("pop push reverse shift sort splice unshift".split(" "),function(n){var t=cr[n];r.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),!qr.spliceObjects&&0===n.length&&delete n[0],this
}}),O(["concat","join","slice"],function(n){var t=cr[n];r.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new i(n),n.__chain__=!0),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=r,define(function(){return r})):W&&!W.nodeType?G?(G.exports=r)._=r:W._=r:n._=r})(this);

File diff suppressed because it is too large Load Diff

View File

@@ -1,36 +0,0 @@
<?php
// cleanup requested filepath
$file = isset($_GET['f']) ? $_GET['f'] : 'lodash';
$file = preg_replace('#(\.*[\/])+#', '', $file);
$file .= preg_match('/\.[a-z]+$/', $file) ? '' : '.js';
// output filename
if (isset($_GET['o'])) {
$output = $_GET['o'];
} else if (isset($_SERVER['argv'][1])) {
$output = $_SERVER['argv'][1];
} else {
$output = basename($file);
}
/*--------------------------------------------------------------------------*/
require('../vendor/docdown/docdown.php');
// generate Markdown
$markdown = docdown(array(
'path' => '../' . $file,
'title' => 'Lo-Dash <sup>v1.2.0</sup>',
'toc' => 'categories',
'url' => 'https://github.com/bestiejs/lodash/blob/master/lodash.js'
));
// save to a .md file
file_put_contents($output . '.md', $markdown);
// print
header('Content-Type: text/plain;charset=utf-8');
echo $markdown . PHP_EOL;
?>

View File

@@ -1 +0,0 @@
module.exports = require('./lodash');

15764
lodash.js

File diff suppressed because it is too large Load Diff

98
lodash.min.js vendored Normal file
View File

@@ -0,0 +1,98 @@
/**
* @license
* lodash 3.9.3 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* Build: `lodash modern -o ./lodash.js`
*/
;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===m,u=n===n,i=null===t,o=t===m,f=t===t;if(n>t&&!i||!u||r&&!o&&f||e&&f)return 1;if(n<t&&!r||!f||i&&!e&&u||o&&u)return-1}return 0}function t(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function r(n,t,r){if(t!==t)return s(n,r);r-=1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function e(n){return typeof n=="function"||false}function u(n){return typeof n=="string"?n:null==n?"":n+""}function i(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););
return r}function o(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function f(t,r){return n(t.a,r.a)||t.b-r.b}function l(n){return Nn[n]}function a(n){return Ln[n]}function c(n){return"\\"+Mn[n]}function s(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function p(n){return!!n&&typeof n=="object"}function h(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n);
}function _(n,t){for(var r=-1,e=n.length,u=-1,i=[];++r<e;)n[r]===t&&(n[r]=L,i[++u]=r);return i}function v(n){for(var t=-1,r=n.length;++t<r&&h(n.charCodeAt(t)););return t}function g(n){for(var t=n.length;t--&&h(n.charCodeAt(t)););return t}function y(n){return zn[n]}function d(h){function Nn(n){if(p(n)&&!(Ti(n)||n instanceof Bn)){if(n instanceof zn)return n;if(ru.call(n,"__chain__")&&ru.call(n,"__wrapped__"))return Mr(n)}return new zn(n)}function Ln(){}function zn(n,t,r){this.__wrapped__=n,this.__actions__=r||[],
this.__chain__=!!t}function Bn(n){this.__wrapped__=n,this.__actions__=null,this.__dir__=1,this.__filtered__=false,this.__iteratees__=null,this.__takeCount__=Su,this.__views__=null}function Mn(){this.__data__={}}function Pn(n){var t=n?n.length:0;for(this.data={hash:bu(null),set:new vu};t--;)this.push(n[t])}function qn(n,t){var r=n.data;return(typeof t=="string"||ve(t)?r.set.has(t):r.hash[t])?0:-1}function Dn(n,t){var r=-1,e=n.length;for(t||(t=Me(e));++r<e;)t[r]=n[r];return t}function Kn(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););
return n}function Vn(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Gn(n,t){for(var r=-1,e=n.length,u=-1,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[++u]=o)}return i}function Jn(n,t){for(var r=-1,e=n.length,u=Me(e);++r<e;)u[r]=t(n[r],r,n);return u}function Xn(n,t,r,e){var u=-1,i=n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function Hn(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;return false}function Qn(n,t){return n===m?t:n}function nt(n,t,r,e){
return n!==m&&ru.call(e,r)?n:t}function tt(n,t,r){for(var e=-1,u=Ki(t),i=u.length;++e<i;){var o=u[e],f=n[o],l=r(f,t[o],o,n,t);(l===l?l===f:f!==f)&&(f!==m||o in n)||(n[o]=l)}return n}function rt(n,t){return null==t?n:ut(t,Ki(t),n)}function et(n,t){for(var r=-1,e=null==n,u=!e&&Ir(n),i=u?n.length:0,o=t.length,f=Me(o);++r<o;){var l=t[r];f[r]=u?Er(l,i)?n[l]:m:e?m:n[l]}return f}function ut(n,t,r){r||(r={});for(var e=-1,u=t.length;++e<u;){var i=t[e];r[i]=n[i]}return r}function it(n,t,r){var e=typeof n;return"function"==e?t===m?n:Mt(n,t,r):null==n?Fe:"object"==e?xt(n):t===m?Be(n):At(n,t);
}function ot(n,t,r,e,u,i,o){var f;if(r&&(f=u?r(n,e,u):r(n)),f!==m)return f;if(!ve(n))return n;if(e=Ti(n)){if(f=jr(n),!t)return Dn(n,f)}else{var l=uu.call(n),a=l==D;if(l!=V&&l!=z&&(!a||u))return $n[l]?Or(n,l,t):u?n:{};if(f=kr(a?{}:n),!t)return rt(f,n)}for(i||(i=[]),o||(o=[]),u=i.length;u--;)if(i[u]==n)return o[u];return i.push(n),o.push(f),(e?Kn:vt)(n,function(e,u){f[u]=ot(e,t,r,u,n,i,o)}),f}function ft(n,t,r){if(typeof n!="function")throw new Je(N);return gu(function(){n.apply(m,r)},t)}function lt(n,t){
var e=n?n.length:0,u=[];if(!e)return u;var i=-1,o=br(),f=o==r,l=f&&200<=t.length?Vu(t):null,a=t.length;l&&(o=qn,f=false,t=l);n:for(;++i<e;)if(l=n[i],f&&l===l){for(var c=a;c--;)if(t[c]===l)continue n;u.push(l)}else 0>o(t,l,0)&&u.push(l);return u}function at(n,t){var r=true;return Mu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function ct(n,t,r,e){var u=e,i=u;return Mu(n,function(n,o,f){o=+t(n,o,f),(r(o,u)||o===e&&o===i)&&(u=o,i=n)}),i}function st(n,t){var r=[];return Mu(n,function(n,e,u){t(n,e,u)&&r.push(n);
}),r}function pt(n,t,r,e){var u;return r(n,function(n,r,i){return t(n,r,i)?(u=e?r:n,false):void 0}),u}function ht(n,t,r){for(var e=-1,u=n.length,i=-1,o=[];++e<u;){var f=n[e];if(p(f)&&Ir(f)&&(r||Ti(f)||se(f))){t&&(f=ht(f,t,r));for(var l=-1,a=f.length;++l<a;)o[++i]=f[l]}else r||(o[++i]=f)}return o}function _t(n,t){qu(n,t,ke)}function vt(n,t){return qu(n,t,Ki)}function gt(n,t){return Du(n,t,Ki)}function yt(n,t){for(var r=-1,e=t.length,u=-1,i=[];++r<e;){var o=t[r];$i(n[o])&&(i[++u]=o)}return i}function dt(n,t,r){
if(null!=n){r!==m&&r in zr(n)&&(t=[r]),r=0;for(var e=t.length;null!=n&&r<e;)n=n[t[r++]];return r&&r==e?n:m}}function mt(n,t,r,e,u,i){if(n===t)n=true;else if(null==n||null==t||!ve(n)&&!p(t))n=n!==n&&t!==t;else n:{var o=mt,f=Ti(n),l=Ti(t),a=B,c=B;f||(a=uu.call(n),a==z?a=V:a!=V&&(f=we(n))),l||(c=uu.call(t),c==z?c=V:c!=V&&we(t));var s=a==V,l=c==V,c=a==c;if(!c||f||s){if(!e&&(a=s&&ru.call(n,"__wrapped__"),l=l&&ru.call(t,"__wrapped__"),a||l)){n=o(a?n.value():n,l?t.value():t,r,e,u,i);break n}if(c){for(u||(u=[]),
i||(i=[]),a=u.length;a--;)if(u[a]==n){n=i[a]==t;break n}u.push(n),i.push(t),n=(f?gr:dr)(n,t,o,r,e,u,i),u.pop(),i.pop()}else n=false}else n=yr(n,t,a)}return n}function wt(n,t,r){var e=t.length,u=e,i=!r;if(null==n)return!u;for(n=zr(n);e--;){var o=t[e];if(i&&o[2]?o[1]!==n[o[0]]:!(o[0]in n))return false}for(;++e<u;){var o=t[e],f=o[0],l=n[f],a=o[1];if(i&&o[2]){if(l===m&&!(f in n))return false}else if(o=r?r(l,a,f):m,o===m?!mt(a,l,r,true):!o)return false}return true}function bt(n,t){var r=-1,e=Ir(n)?Me(n.length):[];return Mu(n,function(n,u,i){
e[++r]=t(n,u,i)}),e}function xt(n){var t=xr(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?false:n[r]===e&&(e!==m||r in zr(n))}}return function(n){return wt(n,t)}}function At(n,t){var r=Ti(n),e=Wr(n)&&t===t&&!ve(t),u=n+"";return n=Br(n),function(i){if(null==i)return false;var o=u;if(i=zr(i),!(!r&&e||o in i)){if(i=1==n.length?i:dt(i,Ct(n,0,-1)),null==i)return false;o=Vr(n),i=zr(i)}return i[o]===t?t!==m||o in i:mt(t,i[o],m,true)}}function jt(n,t,r,e,u){if(!ve(n))return n;var i=Ir(t)&&(Ti(t)||we(t)),o=i?null:Ki(t);
return Kn(o||t,function(f,l){if(o&&(l=f,f=t[l]),p(f)){e||(e=[]),u||(u=[]);n:{for(var a=l,c=e,s=u,h=c.length,_=t[a];h--;)if(c[h]==_){n[a]=s[h];break n}var h=n[a],v=r?r(h,_,a,n,t):m,g=v===m;g&&(v=_,Ir(_)&&(Ti(_)||we(_))?v=Ti(h)?h:Ir(h)?Dn(h):[]:Fi(_)||se(_)?v=se(h)?Ae(h):Fi(h)?h:{}:g=false),c.push(_),s.push(v),g?n[a]=jt(v,_,r,c,s):(v===v?v!==h:h===h)&&(n[a]=v)}}else a=n[l],c=r?r(a,f,l,n,t):m,(s=c===m)&&(c=f),c===m&&(!i||l in n)||!s&&(c===c?c===a:a!==a)||(n[l]=c)}),n}function kt(n){return function(t){return null==t?m:t[n];
}}function Ot(n){var t=n+"";return n=Br(n),function(r){return dt(r,n,t)}}function Rt(n,t){for(var r=n?t.length:0;r--;){var e=t[r];if(e!=u&&Er(e)){var u=e;yu.call(n,e,1)}}}function It(n,t){return n+su(Cu()*(t-n+1))}function Et(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function Ct(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r=r===m||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Me(u);++e<u;)r[e]=n[e+t];return r}function Wt(n,t){var r;return Mu(n,function(n,e,u){
return r=t(n,e,u),!r}),!!r}function St(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function Tt(t,r,e){var u=mr(),i=-1;return r=Jn(r,function(n){return u(n)}),t=bt(t,function(n){return{a:Jn(r,function(t){return t(n)}),b:++i,c:n}}),St(t,function(t,r){var u;n:{u=-1;for(var i=t.a,o=r.a,f=i.length,l=e.length;++u<f;){var a=n(i[u],o[u]);if(a){u=u<l?a*(e[u]?1:-1):a;break n}}u=t.b-r.b}return u})}function Ut(n,t){var r=0;return Mu(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function $t(n,t){var e=-1,u=br(),i=n.length,o=u==r,f=o&&200<=i,l=f?Vu():null,a=[];
l?(u=qn,o=false):(f=false,l=t?[]:a);n:for(;++e<i;){var c=n[e],s=t?t(c,e,n):c;if(o&&c===c){for(var p=l.length;p--;)if(l[p]===s)continue n;t&&l.push(s),a.push(c)}else 0>u(l,s,0)&&((t||f)&&l.push(s),a.push(c))}return a}function Ft(n,t){for(var r=-1,e=t.length,u=Me(e);++r<e;)u[r]=n[t[r]];return u}function Nt(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?Ct(n,e?0:i,e?i+1:u):Ct(n,e?i+1:0,e?u:i)}function Lt(n,t){var r=n;r instanceof Bn&&(r=r.value());for(var e=-1,u=t.length;++e<u;){
var r=[r],i=t[e];_u.apply(r,i.args),r=i.func.apply(i.thisArg,r)}return r}function zt(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=Uu){for(;e<u;){var i=e+u>>>1,o=n[i];(r?o<=t:o<t)&&null!==o?e=i+1:u=i}return u}return Bt(n,t,Fe,r)}function Bt(n,t,r,e){t=r(t);for(var u=0,i=n?n.length:0,o=t!==t,f=null===t,l=t===m;u<i;){var a=su((u+i)/2),c=r(n[a]),s=c!==m,p=c===c;(o?p||e:f?p&&s&&(e||null!=c):l?p&&(e||s):null==c?0:e?c<=t:c<t)?u=a+1:i=a}return Ou(i,Tu)}function Mt(n,t,r){if(typeof n!="function")return Fe;
if(t===m)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)};case 5:return function(r,e,u,i,o){return n.call(t,r,e,u,i,o)}}return function(){return n.apply(t,arguments)}}function Pt(n){return lu.call(n,0)}function qt(n,t,r){for(var e=r.length,u=-1,i=ku(n.length-e,0),o=-1,f=t.length,l=Me(i+f);++o<f;)l[o]=t[o];for(;++u<e;)l[r[u]]=n[u];for(;i--;)l[o++]=n[u++];return l}function Dt(n,t,r){
for(var e=-1,u=r.length,i=-1,o=ku(n.length-u,0),f=-1,l=t.length,a=Me(o+l);++i<o;)a[i]=n[i];for(o=i;++f<l;)a[o+f]=t[f];for(;++e<u;)a[o+r[e]]=n[i++];return a}function Kt(n,t){return function(r,e,u){var i=t?t():{};if(e=mr(e,u,3),Ti(r)){u=-1;for(var o=r.length;++u<o;){var f=r[u];n(i,f,e(f,u,r),r)}}else Mu(r,function(t,r,u){n(i,t,e(t,r,u),u)});return i}}function Vt(n){return ae(function(t,r){var e=-1,u=null==t?0:r.length,i=2<u?r[u-2]:m,o=2<u?r[2]:m,f=1<u?r[u-1]:m;for(typeof i=="function"?(i=Mt(i,f,5),
u-=2):(i=typeof f=="function"?f:m,u-=i?1:0),o&&Cr(r[0],r[1],o)&&(i=3>u?m:i,u=1);++e<u;)(o=r[e])&&n(t,o,i);return t})}function Yt(n,t){return function(r,e){var u=r?Zu(r):0;if(!Tr(u))return n(r,e);for(var i=t?u:-1,o=zr(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function Zt(n){return function(t,r,e){var u=zr(t);e=e(t);for(var i=e.length,o=n?i:-1;n?o--:++o<i;){var f=e[o];if(false===r(u[f],f,u))break}return t}}function Gt(n,t){function r(){return(this&&this!==Yn&&this instanceof r?e:n).apply(t,arguments);
}var e=Xt(n);return r}function Jt(n){return function(t){var r=-1;t=Te(Ie(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Xt(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4])}var r=Bu(n.prototype),t=n.apply(r,t);return ve(t)?t:r}}function Ht(n){function t(r,e,u){return u&&Cr(r,e,u)&&(e=null),
r=vr(r,n,null,null,null,null,null,e),r.placeholder=t.placeholder,r}return t}function Qt(n,t){return function(r,e,u){if(u&&Cr(r,e,u)&&(e=null),e=mr(e,u,3),1==e.length){u=r=Lr(r);for(var i=e,o=-1,f=u.length,l=t,a=l;++o<f;){var c=u[o],s=+i(c);n(s,l)&&(l=s,a=c)}if(u=a,!r.length||u!==t)return u}return ct(r,e,n,t)}}function nr(n,r){return function(e,u,i){return u=mr(u,i,3),Ti(e)?(u=t(e,u,r),-1<u?e[u]:m):pt(e,u,n)}}function tr(n){return function(r,e,u){return r&&r.length?(e=mr(e,u,3),t(r,e,n)):-1}}function rr(n){
return function(t,r,e){return r=mr(r,e,3),pt(t,r,n,true)}}function er(n){return function(){for(var t,r=arguments.length,e=n?r:-1,u=0,i=Me(r);n?e--:++e<r;){var o=i[u++]=arguments[e];if(typeof o!="function")throw new Je(N);!t&&zn.prototype.thru&&"wrapper"==wr(o)&&(t=new zn([]))}for(e=t?-1:r;++e<r;){var o=i[e],u=wr(o),f="wrapper"==u?Yu(o):null;t=f&&Sr(f[0])&&f[1]==(I|j|O|E)&&!f[4].length&&1==f[9]?t[wr(f[0])].apply(t,f[3]):1==o.length&&Sr(o)?t[u]():t.thru(o)}return function(){var n=arguments;if(t&&1==n.length&&Ti(n[0]))return t.plant(n[0]).value();
for(var e=0,n=r?i[e].apply(this,n):n[0];++e<r;)n=i[e].call(this,n);return n}}}function ur(n,t){return function(r,e,u){return typeof e=="function"&&u===m&&Ti(r)?n(r,e):t(r,Mt(e,u,3))}}function ir(n){return function(t,r,e){return(typeof r!="function"||e!==m)&&(r=Mt(r,e,3)),n(t,r,ke)}}function or(n){return function(t,r,e){return(typeof r!="function"||e!==m)&&(r=Mt(r,e,3)),n(t,r)}}function fr(n){return function(t,r,e){var u={};return r=mr(r,e,3),vt(t,function(t,e,i){i=r(t,e,i),e=n?i:e,t=n?t:i,u[e]=t}),
u}}function lr(n){return function(t,r,e){return t=u(t),(n?t:"")+pr(t,r,e)+(n?"":t)}}function ar(n){var t=ae(function(r,e){var u=_(e,t.placeholder);return vr(r,n,null,e,u)});return t}function cr(n,t){return function(r,e,u,i){var o=3>arguments.length;return typeof e=="function"&&i===m&&Ti(r)?n(r,e,u,o):Et(r,mr(e,i,4),u,o,t)}}function sr(n,t,r,e,u,i,o,f,l,a){function c(){for(var w=arguments.length,A=w,j=Me(w);A--;)j[A]=arguments[A];if(e&&(j=qt(j,e,u)),i&&(j=Dt(j,i,o)),v||y){var A=c.placeholder,k=_(j,A),w=w-k.length;
if(w<a){var I=f?Dn(f):null,w=ku(a-w,0),E=v?k:null,k=v?null:k,C=v?j:null,j=v?null:j;return t|=v?O:R,t&=~(v?R:O),g||(t&=~(b|x)),j=[n,t,r,C,E,j,k,I,l,w],I=sr.apply(m,j),Sr(n)&&Gu(I,j),I.placeholder=A,I}}if(A=p?r:this,I=h?A[n]:n,f)for(w=j.length,E=Ou(f.length,w),k=Dn(j);E--;)C=f[E],j[E]=Er(C,w)?k[C]:m;return s&&l<j.length&&(j.length=l),this&&this!==Yn&&this instanceof c&&(I=d||Xt(n)),I.apply(A,j)}var s=t&I,p=t&b,h=t&x,v=t&j,g=t&A,y=t&k,d=h?null:Xt(n);return c}function pr(n,t,r){return n=n.length,t=+t,
n<t&&Au(t)?(t-=n,r=null==r?" ":r+"",We(r,au(t/r.length)).slice(0,t)):""}function hr(n,t,r,e){function u(){for(var t=-1,f=arguments.length,l=-1,a=e.length,c=Me(f+a);++l<a;)c[l]=e[l];for(;f--;)c[l++]=arguments[++t];return(this&&this!==Yn&&this instanceof u?o:n).apply(i?r:this,c)}var i=t&b,o=Xt(n);return u}function _r(n){return function(t,r,e,u){var i=mr(e);return null==e&&i===it?zt(t,r,n):Bt(t,r,i(e,u,1),n)}}function vr(n,t,r,e,u,i,o,f){var l=t&x;if(!l&&typeof n!="function")throw new Je(N);var a=e?e.length:0;
if(a||(t&=~(O|R),e=u=null),a-=u?u.length:0,t&R){var c=e,s=u;e=u=null}var p=l?null:Yu(n);return r=[n,t,r,e,u,c,s,i,o,f],p&&(e=r[1],t=p[1],f=e|t,u=t==I&&e==j||t==I&&e==E&&r[7].length<=p[8]||t==(I|E)&&e==j,(f<I||u)&&(t&b&&(r[2]=p[2],f|=e&b?0:A),(e=p[3])&&(u=r[3],r[3]=u?qt(u,e,p[4]):Dn(e),r[4]=u?_(r[3],L):Dn(p[4])),(e=p[5])&&(u=r[5],r[5]=u?Dt(u,e,p[6]):Dn(e),r[6]=u?_(r[5],L):Dn(p[6])),(e=p[7])&&(r[7]=Dn(e)),t&I&&(r[8]=null==r[8]?p[8]:Ou(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=f),t=r[1],f=r[9]),
r[9]=null==f?l?0:n.length:ku(f-a,0)||0,(p?Ku:Gu)(t==b?Gt(r[0],r[2]):t!=O&&t!=(b|O)||r[4].length?sr.apply(m,r):hr.apply(m,r),r)}function gr(n,t,r,e,u,i,o){var f=-1,l=n.length,a=t.length;if(l!=a&&(!u||a<=l))return false;for(;++f<l;){var c=n[f],a=t[f],s=e?e(u?a:c,u?c:a,f):m;if(s!==m){if(s)continue;return false}if(u){if(!Hn(t,function(n){return c===n||r(c,n,e,u,i,o)}))return false}else if(c!==a&&!r(c,a,e,u,i,o))return false}return true}function yr(n,t,r){switch(r){case M:case P:return+n==+t;case q:return n.name==t.name&&n.message==t.message;
case K:return n!=+n?t!=+t:n==+t;case Y:case Z:return n==t+""}return false}function dr(n,t,r,e,u,i,o){var f=Ki(n),l=f.length,a=Ki(t).length;if(l!=a&&!u)return false;for(a=l;a--;){var c=f[a];if(!(u?c in t:ru.call(t,c)))return false}for(var s=u;++a<l;){var c=f[a],p=n[c],h=t[c],_=e?e(u?h:p,u?p:h,c):m;if(_===m?!r(p,h,e,u,i,o):!_)return false;s||(s="constructor"==c)}return s||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false;
}function mr(n,t,r){var e=Nn.callback||Ue,e=e===Ue?it:e;return r?e(n,t,r):e}function wr(n){for(var t=n.name,r=Lu[t],e=r?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function br(n,t,e){var u=Nn.indexOf||Kr,u=u===Kr?r:u;return n?u(n,t,e):u}function xr(n){n=Oe(n);for(var t=n.length;t--;){var r=n[t][1];n[t][2]=r===r&&!ve(r)}return n}function Ar(n,t){var r=null==n?m:n[t];return ge(r)?r:m}function jr(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&ru.call(n,"index")&&(r.index=n.index,
r.input=n.input),r}function kr(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Ye),new n}function Or(n,t,r){var e=n.constructor;switch(t){case G:return Pt(n);case M:case P:return new e(+n);case J:case X:case H:case Q:case nn:case tn:case rn:case en:case un:return t=n.buffer,new e(r?Pt(t):t,n.byteOffset,n.length);case K:case Z:return new e(n);case Y:var u=new e(n.source,jn.exec(n));u.lastIndex=n.lastIndex}return u}function Rr(n,t,r){return null==n||Wr(t,n)||(t=Br(t),n=1==t.length?n:dt(n,Ct(t,0,-1)),
t=Vr(t)),t=null==n?n:n[t],null==t?m:t.apply(n,r)}function Ir(n){return null!=n&&Tr(Zu(n))}function Er(n,t){return n=typeof n=="number"||Rn.test(n)?+n:-1,t=null==t?Fu:t,-1<n&&0==n%1&&n<t}function Cr(n,t,r){if(!ve(r))return false;var e=typeof t;return("number"==e?Ir(r)&&Er(t,r.length):"string"==e&&t in r)?(t=r[t],n===n?n===t:t!==t):false}function Wr(n,t){var r=typeof n;return"string"==r&&yn.test(n)||"number"==r?true:Ti(n)?false:!gn.test(n)||null!=t&&n in zr(t)}function Sr(n){var t=wr(n);return t in Bn.prototype?(t=Nn[t],
n===t?true:(t=Yu(t),!!t&&n===t[0])):false}function Tr(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=Fu}function Ur(n,t){n=zr(n);for(var r=-1,e=t.length,u={};++r<e;){var i=t[r];i in n&&(u[i]=n[i])}return u}function $r(n,t){var r={};return _t(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function Fr(n){var t;if(!p(n)||uu.call(n)!=V||!(ru.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return _t(n,function(n,t){r=t}),r===m||ru.call(n,r)}function Nr(n){for(var t=ke(n),r=t.length,e=r&&n.length,u=!!e&&Tr(e)&&(Ti(n)||se(n)),i=-1,o=[];++i<r;){
var f=t[i];(u&&Er(f,e)||ru.call(n,f))&&o.push(f)}return o}function Lr(n){return null==n?[]:Ir(n)?ve(n)?n:Ye(n):Re(n)}function zr(n){return ve(n)?n:Ye(n)}function Br(n){if(Ti(n))return n;var t=[];return u(n).replace(dn,function(n,r,e,u){t.push(e?u.replace(xn,"$1"):r||n)}),t}function Mr(n){return n instanceof Bn?n.clone():new zn(n.__wrapped__,n.__chain__,Dn(n.__actions__))}function Pr(n,t,r){return n&&n.length?((r?Cr(n,t,r):null==t)&&(t=1),Ct(n,0>t?0:t)):[]}function qr(n,t,r){var e=n?n.length:0;return e?((r?Cr(n,t,r):null==t)&&(t=1),
t=e-(+t||0),Ct(n,0,0>t?0:t)):[]}function Dr(n){return n?n[0]:m}function Kr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?ku(u+e,0):e;else if(e)return e=zt(n,t),n=n[e],(t===t?t===n:n!==n)?e:-1;return r(n,t,e||0)}function Vr(n){var t=n?n.length:0;return t?n[t-1]:m}function Yr(n){return Pr(n,1)}function Zr(n,t,e,u){if(!n||!n.length)return[];null!=t&&typeof t!="boolean"&&(u=e,e=Cr(n,t,u)?null:t,t=false);var i=mr();if((null!=e||i!==it)&&(e=i(e,u,3)),t&&br()==r){t=e;var o;e=-1,u=n.length;
for(var i=-1,f=[];++e<u;){var l=n[e],a=t?t(l,e,n):l;e&&o===a||(o=a,f[++i]=l)}n=f}else n=$t(n,e);return n}function Gr(n){if(!n||!n.length)return[];var t=-1,r=0;n=Gn(n,function(n){return Ir(n)?(r=ku(n.length,r),true):void 0});for(var e=Me(r);++t<r;)e[t]=Jn(n,kt(t));return e}function Jr(n,t,r){return n&&n.length?(n=Gr(n),null==t?n:(t=Mt(t,r,4),Jn(n,function(n){return Xn(n,t,m,true)}))):[]}function Xr(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||Ti(n[0])||(t=[]);++r<e;){var i=n[r];t?u[i]=t[r]:i&&(u[i[0]]=i[1]);
}return u}function Hr(n){return n=Nn(n),n.__chain__=true,n}function Qr(n,t,r){return t.call(r,n)}function ne(n,t,r){var e=Ti(n)?Vn:at;return r&&Cr(n,t,r)&&(t=null),(typeof t!="function"||r!==m)&&(t=mr(t,r,3)),e(n,t)}function te(n,t,r){var e=Ti(n)?Gn:st;return t=mr(t,r,3),e(n,t)}function re(n,t,r,e){var u=n?Zu(n):0;return Tr(u)||(n=Re(n),u=n.length),u?(r=typeof r!="number"||e&&Cr(t,r,e)?0:0>r?ku(u+r,0):r||0,typeof n=="string"||!Ti(n)&&me(n)?r<u&&-1<n.indexOf(t,r):-1<br(n,t,r)):false}function ee(n,t,r){
var e=Ti(n)?Jn:bt;return t=mr(t,r,3),e(n,t)}function ue(n,t,r){if(r?Cr(n,t,r):null==t){n=Lr(n);var e=n.length;return 0<e?n[It(0,e-1)]:m}r=-1,n=xe(n);var e=n.length,u=e-1;for(t=Ou(0>t?0:+t||0,e);++r<t;){var e=It(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function ie(n,t,r){var e=Ti(n)?Hn:Wt;return r&&Cr(n,t,r)&&(t=null),(typeof t!="function"||r!==m)&&(t=mr(t,r,3)),e(n,t)}function oe(n,t){var r;if(typeof t!="function"){if(typeof n!="function")throw new Je(N);var e=n;n=t,t=e}return function(){
return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}}function fe(n,t,r){function e(){var r=t-(wi()-a);0>=r||r>t?(f&&cu(f),r=p,f=s=p=m,r&&(h=wi(),l=n.apply(c,o),s||f||(o=c=null))):s=gu(e,r)}function u(){s&&cu(s),f=s=p=m,(v||_!==t)&&(h=wi(),l=n.apply(c,o),s||f||(o=c=null))}function i(){if(o=arguments,a=wi(),c=this,p=v&&(s||!g),false===_)var r=g&&!s;else{f||g||(h=a);var i=_-(a-h),y=0>=i||i>_;y?(f&&(f=cu(f)),h=a,l=n.apply(c,o)):f||(f=gu(u,i))}return y&&s?s=cu(s):s||t===_||(s=gu(e,t)),r&&(y=true,l=n.apply(c,o)),
!y||s||f||(o=c=null),l}var o,f,l,a,c,s,p,h=0,_=false,v=true;if(typeof n!="function")throw new Je(N);if(t=0>t?0:+t||0,true===r)var g=true,v=false;else ve(r)&&(g=r.leading,_="maxWait"in r&&ku(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return i.cancel=function(){s&&cu(s),f&&cu(f),f=s=p=m},i}function le(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new Je(N);return r.cache=new le.Cache,
r}function ae(n,t){if(typeof n!="function")throw new Je(N);return t=ku(t===m?n.length-1:+t||0,0),function(){for(var r=arguments,e=-1,u=ku(r.length-t,0),i=Me(u);++e<u;)i[e]=r[t+e];switch(t){case 0:return n.call(this,i);case 1:return n.call(this,r[0],i);case 2:return n.call(this,r[0],r[1],i)}for(u=Me(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=i,n.apply(this,u)}}function ce(n,t){return n>t}function se(n){return p(n)&&Ir(n)&&uu.call(n)==z}function pe(n){return!!n&&1===n.nodeType&&p(n)&&-1<uu.call(n).indexOf("Element");
}function he(n,t,r,e){return e=(r=typeof r=="function"?Mt(r,e,3):m)?r(n,t):m,e===m?mt(n,t,r):!!e}function _e(n){return p(n)&&typeof n.message=="string"&&uu.call(n)==q}function ve(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function ge(n){return null==n?false:uu.call(n)==D?ou.test(tu.call(n)):p(n)&&On.test(n)}function ye(n){return typeof n=="number"||p(n)&&uu.call(n)==K}function de(n){return p(n)&&uu.call(n)==Y}function me(n){return typeof n=="string"||p(n)&&uu.call(n)==Z}function we(n){return p(n)&&Tr(n.length)&&!!Un[uu.call(n)];
}function be(n,t){return n<t}function xe(n){var t=n?Zu(n):0;return Tr(t)?t?Dn(n):[]:Re(n)}function Ae(n){return ut(n,ke(n))}function je(n){return yt(n,ke(n))}function ke(n){if(null==n)return[];ve(n)||(n=Ye(n));for(var t=n.length,t=t&&Tr(t)&&(Ti(n)||se(n))&&t||0,r=n.constructor,e=-1,r=typeof r=="function"&&r.prototype===n,u=Me(t),i=0<t;++e<t;)u[e]=e+"";for(var o in n)i&&Er(o,t)||"constructor"==o&&(r||!ru.call(n,o))||u.push(o);return u}function Oe(n){n=zr(n);for(var t=-1,r=Ki(n),e=r.length,u=Me(e);++t<e;){
var i=r[t];u[t]=[i,n[i]]}return u}function Re(n){return Ft(n,Ki(n))}function Ie(n){return(n=u(n))&&n.replace(In,l).replace(bn,"")}function Ee(n){return(n=u(n))&&wn.test(n)?n.replace(mn,"\\$&"):n}function Ce(n,t,r){return r&&Cr(n,t,r)&&(t=0),Eu(n,t)}function We(n,t){var r="";if(n=u(n),t=+t,1>t||!n||!Au(t))return r;do t%2&&(r+=n),t=su(t/2),n+=n;while(t);return r}function Se(n,t,r){var e=n;return(n=u(n))?(r?Cr(e,t,r):null==t)?n.slice(v(n),g(n)+1):(t+="",n.slice(i(n,t),o(n,t)+1)):n}function Te(n,t,r){
return r&&Cr(n,t,r)&&(t=null),n=u(n),n.match(t||Wn)||[]}function Ue(n,t,r){return r&&Cr(n,t,r)&&(t=null),p(n)?Ne(n):it(n,t)}function $e(n){return function(){return n}}function Fe(n){return n}function Ne(n){return xt(ot(n,true))}function Le(n,t,r){if(null==r){var e=ve(t),u=e?Ki(t):null;((u=u&&u.length?yt(t,u):null)?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=yt(t,Ki(t)));var i=true,e=-1,o=$i(n),f=u.length;false===r?i=false:ve(r)&&"chain"in r&&(i=r.chain);for(;++e<f;){r=u[e];var l=t[r];n[r]=l,o&&(n.prototype[r]=function(t){
return function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=Dn(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return r=[this.value()],_u.apply(r,arguments),t.apply(n,r)}}(l))}return n}function ze(){}function Be(n){return Wr(n)?kt(n):Ot(n)}h=h?Zn.defaults(Yn.Object(),h,Zn.pick(Yn,Tn)):Yn;var Me=h.Array,Pe=h.Date,qe=h.Error,De=h.Function,Ke=h.Math,Ve=h.Number,Ye=h.Object,Ze=h.RegExp,Ge=h.String,Je=h.TypeError,Xe=Me.prototype,He=Ye.prototype,Qe=Ge.prototype,nu=(nu=h.window)?nu.document:null,tu=De.prototype.toString,ru=He.hasOwnProperty,eu=0,uu=He.toString,iu=h._,ou=Ze("^"+Ee(tu.call(ru)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fu=Ar(h,"ArrayBuffer"),lu=Ar(fu&&new fu(0),"slice"),au=Ke.ceil,cu=h.clearTimeout,su=Ke.floor,pu=Ar(Ye,"getPrototypeOf"),hu=h.parseFloat,_u=Xe.push,vu=Ar(h,"Set"),gu=h.setTimeout,yu=Xe.splice,du=Ar(h,"Uint8Array"),mu=Ar(h,"WeakMap"),wu=function(){
try{var n=Ar(h,"Float64Array"),t=new n(new fu(10),0,1)&&n}catch(r){}return t||null}(),bu=Ar(Ye,"create"),xu=Ar(Me,"isArray"),Au=h.isFinite,ju=Ar(Ye,"keys"),ku=Ke.max,Ou=Ke.min,Ru=Ar(Pe,"now"),Iu=Ar(Ve,"isFinite"),Eu=h.parseInt,Cu=Ke.random,Wu=Ve.NEGATIVE_INFINITY,Su=Ve.POSITIVE_INFINITY,Tu=4294967294,Uu=2147483647,$u=wu?wu.BYTES_PER_ELEMENT:0,Fu=9007199254740991,Nu=mu&&new mu,Lu={},zu=Nn.support={};!function(n){function t(){this.x=n}var r=[];t.prototype={valueOf:n,y:n};for(var e in new t)r.push(e);
try{zu.dom=11===nu.createDocumentFragment().nodeType}catch(u){zu.dom=false}}(1,0),Nn.templateSettings={escape:hn,evaluate:_n,interpolate:vn,variable:"",imports:{_:Nn}};var Bu=function(){function n(){}return function(t){if(ve(t)){n.prototype=t;var r=new n;n.prototype=null}return r||{}}}(),Mu=Yt(vt),Pu=Yt(gt,true),qu=Zt(),Du=Zt(true),Ku=Nu?function(n,t){return Nu.set(n,t),n}:Fe;lu||(Pt=fu&&du?function(n){var t=n.byteLength,r=wu?su(t/$u):0,e=r*$u,u=new fu(t);if(r){var i=new wu(u,0,r);i.set(new wu(n,0,r))}return t!=e&&(i=new du(u,e),
i.set(new du(n,e))),u}:$e(null));var Vu=bu&&vu?function(n){return new Pn(n)}:$e(null),Yu=Nu?function(n){return Nu.get(n)}:ze,Zu=kt("length"),Gu=function(){var n=0,t=0;return function(r,e){var u=wi(),i=T-(u-t);if(t=u,0<i){if(++n>=S)return r}else n=0;return Ku(r,e)}}(),Ju=ae(function(n,t){return Ir(n)?lt(n,ht(t,false,true)):[]}),Xu=tr(),Hu=tr(true),Qu=ae(function(n){for(var t=n.length,e=t,u=Me(c),i=br(),o=i==r,f=[];e--;){var l=n[e]=Ir(l=n[e])?l:[];u[e]=o&&120<=l.length?Vu(e&&l):null}var o=n[0],a=-1,c=o?o.length:0,s=u[0];
n:for(;++a<c;)if(l=o[a],0>(s?qn(s,l):i(f,l,0))){for(e=t;--e;){var p=u[e];if(0>(p?qn(p,l):i(n[e],l,0)))continue n}s&&s.push(l),f.push(l)}return f}),ni=ae(function(t,r){r=ht(r);var e=et(t,r);return Rt(t,r.sort(n)),e}),ti=_r(),ri=_r(true),ei=ae(function(n){return $t(ht(n,false,true))}),ui=ae(function(n,t){return Ir(n)?lt(n,t):[]}),ii=ae(Gr),oi=ae(function(n){var t=n.length,r=2<t?n[t-2]:m,e=1<t?n[t-1]:m;return 2<t&&typeof r=="function"?t-=2:(r=1<t&&typeof e=="function"?(--t,e):m,e=m),n.length=t,Jr(n,r,e)}),fi=ae(function(n,t){
return et(n,ht(t))}),li=Kt(function(n,t,r){ru.call(n,r)?++n[r]:n[r]=1}),ai=nr(Mu),ci=nr(Pu,true),si=ur(Kn,Mu),pi=ur(function(n,t){for(var r=n.length;r--&&false!==t(n[r],r,n););return n},Pu),hi=Kt(function(n,t,r){ru.call(n,r)?n[r].push(t):n[r]=[t]}),_i=Kt(function(n,t,r){n[r]=t}),vi=ae(function(n,t,r){var e=-1,u=typeof t=="function",i=Wr(t),o=Ir(n)?Me(n.length):[];return Mu(n,function(n){var f=u?t:i&&null!=n?n[t]:null;o[++e]=f?f.apply(n,r):Rr(n,t,r)}),o}),gi=Kt(function(n,t,r){n[r?0:1].push(t)},function(){
return[[],[]]}),yi=cr(Xn,Mu),di=cr(function(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r},Pu),mi=ae(function(n,t){if(null==n)return[];var r=t[2];return r&&Cr(t[0],t[1],r)&&(t.length=1),Tt(n,ht(t),[])}),wi=Ru||function(){return(new Pe).getTime()},bi=ae(function(n,t,r){var e=b;if(r.length)var u=_(r,bi.placeholder),e=e|O;return vr(n,e,t,r,u)}),xi=ae(function(n,t){t=t.length?ht(t):je(n);for(var r=-1,e=t.length;++r<e;){var u=t[r];n[u]=vr(n[u],b,n)}return n}),Ai=ae(function(n,t,r){
var e=b|x;if(r.length)var u=_(r,Ai.placeholder),e=e|O;return vr(t,e,n,r,u)}),ji=Ht(j),ki=Ht(k),Oi=ae(function(n,t){return ft(n,1,t)}),Ri=ae(function(n,t,r){return ft(n,t,r)}),Ii=er(),Ei=er(true),Ci=ar(O),Wi=ar(R),Si=ae(function(n,t){return vr(n,E,null,null,null,ht(t))}),Ti=xu||function(n){return p(n)&&Tr(n.length)&&uu.call(n)==B};zu.dom||(pe=function(n){return!!n&&1===n.nodeType&&p(n)&&!Fi(n)});var Ui=Iu||function(n){return typeof n=="number"&&Au(n)},$i=e(/x/)||du&&!e(du)?function(n){return uu.call(n)==D;
}:e,Fi=pu?function(n){if(!n||uu.call(n)!=V)return false;var t=Ar(n,"valueOf"),r=t&&(r=pu(t))&&pu(r);return r?n==r||pu(n)==r:Fr(n)}:Fr,Ni=Vt(function(n,t,r){return r?tt(n,t,r):rt(n,t)}),Li=ae(function(n){var t=n[0];return null==t?t:(n.push(Qn),Ni.apply(m,n))}),zi=rr(vt),Bi=rr(gt),Mi=ir(qu),Pi=ir(Du),qi=or(vt),Di=or(gt),Ki=ju?function(n){var t=null==n?null:n.constructor;return typeof t=="function"&&t.prototype===n||typeof n!="function"&&Ir(n)?Nr(n):ve(n)?ju(n):[]}:Nr,Vi=fr(true),Yi=fr(),Zi=Vt(jt),Gi=ae(function(n,t){
if(null==n)return{};if("function"!=typeof t[0])return t=Jn(ht(t),Ge),Ur(n,lt(ke(n),t));var r=Mt(t[0],t[1],3);return $r(n,function(n,t,e){return!r(n,t,e)})}),Ji=ae(function(n,t){return null==n?{}:"function"==typeof t[0]?$r(n,Mt(t[0],t[1],3)):Ur(n,ht(t))}),Xi=Jt(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t)}),Hi=Jt(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Qi=lr(),no=lr(true);8!=Eu(Sn+"08")&&(Ce=function(n,t,r){return(r?Cr(n,t,r):null==t)?t=0:t&&(t=+t),
n=Se(n),Eu(n,t||(kn.test(n)?16:10))});var to=Jt(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),ro=Jt(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),eo=ae(function(n,t){try{return n.apply(m,t)}catch(r){return _e(r)?r:new qe(r)}}),uo=ae(function(n,t){return function(r){return Rr(r,n,t)}}),io=ae(function(n,t){return function(r){return Rr(n,r,t)}}),oo=Qt(ce,Wu),fo=Qt(be,Su);return Nn.prototype=Ln.prototype,zn.prototype=Bu(Ln.prototype),zn.prototype.constructor=zn,
Bn.prototype=Bu(Ln.prototype),Bn.prototype.constructor=Bn,Mn.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]},Mn.prototype.get=function(n){return"__proto__"==n?m:this.__data__[n]},Mn.prototype.has=function(n){return"__proto__"!=n&&ru.call(this.__data__,n)},Mn.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Pn.prototype.push=function(n){var t=this.data;typeof n=="string"||ve(n)?t.set.add(n):t.hash[n]=true},le.Cache=Mn,Nn.after=function(n,t){if(typeof t!="function"){
if(typeof n!="function")throw new Je(N);var r=n;n=t,t=r}return n=Au(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0}},Nn.ary=function(n,t,r){return r&&Cr(n,t,r)&&(t=null),t=n&&null==t?n.length:ku(+t||0,0),vr(n,I,null,null,null,null,t)},Nn.assign=Ni,Nn.at=fi,Nn.before=oe,Nn.bind=bi,Nn.bindAll=xi,Nn.bindKey=Ai,Nn.callback=Ue,Nn.chain=Hr,Nn.chunk=function(n,t,r){t=(r?Cr(n,t,r):null==t)?1:ku(+t||1,1),r=0;for(var e=n?n.length:0,u=-1,i=Me(au(e/t));r<e;)i[++u]=Ct(n,r,r+=t);return i},Nn.compact=function(n){
for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var i=n[t];i&&(u[++e]=i)}return u},Nn.constant=$e,Nn.countBy=li,Nn.create=function(n,t,r){var e=Bu(n);return r&&Cr(n,t,r)&&(t=null),t?rt(e,t):e},Nn.curry=ji,Nn.curryRight=ki,Nn.debounce=fe,Nn.defaults=Li,Nn.defer=Oi,Nn.delay=Ri,Nn.difference=Ju,Nn.drop=Pr,Nn.dropRight=qr,Nn.dropRightWhile=function(n,t,r){return n&&n.length?Nt(n,mr(t,r,3),true,true):[]},Nn.dropWhile=function(n,t,r){return n&&n.length?Nt(n,mr(t,r,3),true):[]},Nn.fill=function(n,t,r,e){var u=n?n.length:0;
if(!u)return[];for(r&&typeof r!="number"&&Cr(n,t,r)&&(r=0,e=u),u=n.length,r=null==r?0:+r||0,0>r&&(r=-r>u?0:u+r),e=e===m||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;r<u;)n[r++]=t;return n},Nn.filter=te,Nn.flatten=function(n,t,r){var e=n?n.length:0;return r&&Cr(n,t,r)&&(t=false),e?ht(n,t):[]},Nn.flattenDeep=function(n){return n&&n.length?ht(n,true):[]},Nn.flow=Ii,Nn.flowRight=Ei,Nn.forEach=si,Nn.forEachRight=pi,Nn.forIn=Mi,Nn.forInRight=Pi,Nn.forOwn=qi,Nn.forOwnRight=Di,Nn.functions=je,Nn.groupBy=hi,Nn.indexBy=_i,
Nn.initial=function(n){return qr(n,1)},Nn.intersection=Qu,Nn.invert=function(n,t,r){r&&Cr(n,t,r)&&(t=null),r=-1;for(var e=Ki(n),u=e.length,i={};++r<u;){var o=e[r],f=n[o];t?ru.call(i,f)?i[f].push(o):i[f]=[o]:i[f]=o}return i},Nn.invoke=vi,Nn.keys=Ki,Nn.keysIn=ke,Nn.map=ee,Nn.mapKeys=Vi,Nn.mapValues=Yi,Nn.matches=Ne,Nn.matchesProperty=function(n,t){return At(n,ot(t,true))},Nn.memoize=le,Nn.merge=Zi,Nn.method=uo,Nn.methodOf=io,Nn.mixin=Le,Nn.negate=function(n){if(typeof n!="function")throw new Je(N);return function(){
return!n.apply(this,arguments)}},Nn.omit=Gi,Nn.once=function(n){return oe(2,n)},Nn.pairs=Oe,Nn.partial=Ci,Nn.partialRight=Wi,Nn.partition=gi,Nn.pick=Ji,Nn.pluck=function(n,t){return ee(n,Be(t))},Nn.property=Be,Nn.propertyOf=function(n){return function(t){return dt(n,Br(t),t+"")}},Nn.pull=function(){var n=arguments,t=n[0];if(!t||!t.length)return t;for(var r=0,e=br(),u=n.length;++r<u;)for(var i=0,o=n[r];-1<(i=e(t,o,i));)yu.call(t,i,1);return t},Nn.pullAt=ni,Nn.range=function(n,t,r){r&&Cr(n,t,r)&&(t=r=null),
n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=ku(au((t-n)/(r||1)),0);for(var u=Me(t);++e<t;)u[e]=n,n+=r;return u},Nn.rearg=Si,Nn.reject=function(n,t,r){var e=Ti(n)?Gn:st;return t=mr(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Nn.remove=function(n,t,r){var e=[];if(!n||!n.length)return e;var u=-1,i=[],o=n.length;for(t=mr(t,r,3);++u<o;)r=n[u],t(r,u,n)&&(e.push(r),i.push(u));return Rt(n,i),e},Nn.rest=Yr,Nn.restParam=ae,Nn.set=function(n,t,r){if(null==n)return n;var e=t+"";t=null!=n[e]||Wr(t,n)?[e]:Br(t);
for(var e=-1,u=t.length,i=u-1,o=n;null!=o&&++e<u;){var f=t[e];ve(o)&&(e==i?o[f]=r:null==o[f]&&(o[f]=Er(t[e+1])?[]:{})),o=o[f]}return n},Nn.shuffle=function(n){return ue(n,Su)},Nn.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&Cr(n,t,r)&&(t=0,r=e),Ct(n,t,r)):[]},Nn.sortBy=function(n,t,r){if(null==n)return[];r&&Cr(n,t,r)&&(t=null);var e=-1;return t=mr(t,r,3),n=bt(n,function(n,r,u){return{a:t(n,r,u),b:++e,c:n}}),St(n,f)},Nn.sortByAll=mi,Nn.sortByOrder=function(n,t,r,e){return null==n?[]:(e&&Cr(t,r,e)&&(r=null),
Ti(t)||(t=null==t?[]:[t]),Ti(r)||(r=null==r?[]:[r]),Tt(n,t,r))},Nn.spread=function(n){if(typeof n!="function")throw new Je(N);return function(t){return n.apply(this,t)}},Nn.take=function(n,t,r){return n&&n.length?((r?Cr(n,t,r):null==t)&&(t=1),Ct(n,0,0>t?0:t)):[]},Nn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?Cr(n,t,r):null==t)&&(t=1),t=e-(+t||0),Ct(n,0>t?0:t)):[]},Nn.takeRightWhile=function(n,t,r){return n&&n.length?Nt(n,mr(t,r,3),false,true):[]},Nn.takeWhile=function(n,t,r){return n&&n.length?Nt(n,mr(t,r,3)):[];
},Nn.tap=function(n,t,r){return t.call(r,n),n},Nn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Je(N);return false===r?e=false:ve(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Fn.leading=e,Fn.maxWait=+t,Fn.trailing=u,fe(n,t,Fn)},Nn.thru=Qr,Nn.times=function(n,t,r){if(n=su(n),1>n||!Au(n))return[];var e=-1,u=Me(Ou(n,4294967295));for(t=Mt(t,r,1);++e<n;)4294967295>e?u[e]=t(e):t(e);return u},Nn.toArray=xe,Nn.toPlainObject=Ae,Nn.transform=function(n,t,r,e){var u=Ti(n)||we(n);
return t=mr(t,e,4),null==r&&(u||ve(n)?(e=n.constructor,r=u?Ti(n)?new e:[]:Bu($i(e)?e.prototype:null)):r={}),(u?Kn:vt)(n,function(n,e,u){return t(r,n,e,u)}),r},Nn.union=ei,Nn.uniq=Zr,Nn.unzip=Gr,Nn.unzipWith=Jr,Nn.values=Re,Nn.valuesIn=function(n){return Ft(n,ke(n))},Nn.where=function(n,t){return te(n,xt(t))},Nn.without=ui,Nn.wrap=function(n,t){return t=null==t?Fe:t,vr(t,O,null,[n],[])},Nn.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(Ir(r))var e=e?lt(e,r).concat(lt(r,e)):r;
}return e?$t(e):[]},Nn.zip=ii,Nn.zipObject=Xr,Nn.zipWith=oi,Nn.backflow=Ei,Nn.collect=ee,Nn.compose=Ei,Nn.each=si,Nn.eachRight=pi,Nn.extend=Ni,Nn.iteratee=Ue,Nn.methods=je,Nn.object=Xr,Nn.select=te,Nn.tail=Yr,Nn.unique=Zr,Le(Nn,Nn),Nn.add=function(n,t){return(+n||0)+(+t||0)},Nn.attempt=eo,Nn.camelCase=Xi,Nn.capitalize=function(n){return(n=u(n))&&n.charAt(0).toUpperCase()+n.slice(1)},Nn.clone=function(n,t,r,e){return t&&typeof t!="boolean"&&Cr(n,t,r)?t=false:typeof t=="function"&&(e=r,r=t,t=false),typeof r=="function"?ot(n,t,Mt(r,e,1)):ot(n,t);
},Nn.cloneDeep=function(n,t,r){return typeof t=="function"?ot(n,true,Mt(t,r,1)):ot(n,true)},Nn.deburr=Ie,Nn.endsWith=function(n,t,r){n=u(n),t+="";var e=n.length;return r=r===m?e:Ou(0>r?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Nn.escape=function(n){return(n=u(n))&&pn.test(n)?n.replace(cn,a):n},Nn.escapeRegExp=Ee,Nn.every=ne,Nn.find=ai,Nn.findIndex=Xu,Nn.findKey=zi,Nn.findLast=ci,Nn.findLastIndex=Hu,Nn.findLastKey=Bi,Nn.findWhere=function(n,t){return ai(n,xt(t))},Nn.first=Dr,Nn.get=function(n,t,r){
return n=null==n?m:dt(n,Br(t),t+""),n===m?r:n},Nn.gt=ce,Nn.gte=function(n,t){return n>=t},Nn.has=function(n,t){if(null==n)return false;var r=ru.call(n,t);if(!r&&!Wr(t)){if(t=Br(t),n=1==t.length?n:dt(n,Ct(t,0,-1)),null==n)return false;t=Vr(t),r=ru.call(n,t)}return r||Tr(n.length)&&Er(t,n.length)&&(Ti(n)||se(n))},Nn.identity=Fe,Nn.includes=re,Nn.indexOf=Kr,Nn.inRange=function(n,t,r){return t=+t||0,"undefined"===typeof r?(r=t,t=0):r=+r||0,n>=Ou(t,r)&&n<ku(t,r)},Nn.isArguments=se,Nn.isArray=Ti,Nn.isBoolean=function(n){
return true===n||false===n||p(n)&&uu.call(n)==M},Nn.isDate=function(n){return p(n)&&uu.call(n)==P},Nn.isElement=pe,Nn.isEmpty=function(n){return null==n?true:Ir(n)&&(Ti(n)||me(n)||se(n)||p(n)&&$i(n.splice))?!n.length:!Ki(n).length},Nn.isEqual=he,Nn.isError=_e,Nn.isFinite=Ui,Nn.isFunction=$i,Nn.isMatch=function(n,t,r,e){return r=typeof r=="function"?Mt(r,e,3):m,wt(n,xr(t),r)},Nn.isNaN=function(n){return ye(n)&&n!=+n},Nn.isNative=ge,Nn.isNull=function(n){return null===n},Nn.isNumber=ye,Nn.isObject=ve,Nn.isPlainObject=Fi,
Nn.isRegExp=de,Nn.isString=me,Nn.isTypedArray=we,Nn.isUndefined=function(n){return n===m},Nn.kebabCase=Hi,Nn.last=Vr,Nn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?ku(e+r,0):Ou(r||0,e-1))+1;else if(r)return u=zt(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return s(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Nn.lt=be,Nn.lte=function(n,t){return n<=t},Nn.max=oo,Nn.min=fo,Nn.noConflict=function(){return h._=iu,this},Nn.noop=ze,Nn.now=wi,
Nn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return e<t&&Au(t)?(e=(t-e)/2,t=su(e),e=au(e),r=pr("",e,r),r.slice(0,t)+n+r):n},Nn.padLeft=Qi,Nn.padRight=no,Nn.parseInt=Ce,Nn.random=function(n,t,r){r&&Cr(n,t,r)&&(t=r=null);var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Cu(),Ou(n+r*(t-n+hu("1e-"+((r+"").length-1))),t)):It(n,t)},Nn.reduce=yi,Nn.reduceRight=di,Nn.repeat=We,Nn.result=function(n,t,r){
var e=null==n?m:n[t];return e===m&&(null==n||Wr(t,n)||(t=Br(t),n=1==t.length?n:dt(n,Ct(t,0,-1)),e=null==n?m:n[Vr(t)]),e=e===m?r:e),$i(e)?e.call(n):e},Nn.runInContext=d,Nn.size=function(n){var t=n?Zu(n):0;return Tr(t)?t:Ki(n).length},Nn.snakeCase=to,Nn.some=ie,Nn.sortedIndex=ti,Nn.sortedLastIndex=ri,Nn.startCase=ro,Nn.startsWith=function(n,t,r){return n=u(n),r=null==r?0:Ou(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Nn.sum=function(n,t,r){r&&Cr(n,t,r)&&(t=null);var e=mr(),u=null==t;if(u&&e===it||(u=false,
t=e(t,r,3)),u){for(n=Ti(n)?n:Lr(n),t=n.length,r=0;t--;)r+=+n[t]||0;n=r}else n=Ut(n,t);return n},Nn.template=function(n,t,r){var e=Nn.templateSettings;r&&Cr(n,t,r)&&(t=r=null),n=u(n),t=tt(rt({},r||t),e,nt),r=tt(rt({},t.imports),e.imports,nt);var i,o,f=Ki(r),l=Ft(r,f),a=0;r=t.interpolate||En;var s="__p+='";r=Ze((t.escape||En).source+"|"+r.source+"|"+(r===vn?An:En).source+"|"+(t.evaluate||En).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,l){
return e||(e=u),s+=n.slice(a,l).replace(Cn,c),r&&(i=true,s+="'+__e("+r+")+'"),f&&(o=true,s+="';"+f+";\n__p+='"),e&&(s+="'+((__t=("+e+"))==null?'':__t)+'"),a=l+t.length,t}),s+="';",(t=t.variable)||(s="with(obj){"+s+"}"),s=(o?s.replace(on,""):s).replace(fn,"$1").replace(ln,"$1;"),s="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(i?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+s+"return __p}",t=eo(function(){return De(f,p+"return "+s).apply(m,l);
}),t.source=s,_e(t))throw t;return t},Nn.trim=Se,Nn.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?Cr(e,t,r):null==t)?v(n):i(n,t+"")):n},Nn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?Cr(e,t,r):null==t)?n.slice(0,g(n)+1):n.slice(0,o(n,t+"")+1):n},Nn.trunc=function(n,t,r){r&&Cr(n,t,r)&&(t=null);var e=C;if(r=W,null!=t)if(ve(t)){var i="separator"in t?t.separator:i,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,
1>e)return r;if(t=n.slice(0,e),null==i)return t+r;if(de(i)){if(n.slice(e).search(i)){var o,f=n.slice(0,e);for(i.global||(i=Ze(i.source,(jn.exec(i)||"")+"g")),i.lastIndex=0;n=i.exec(f);)o=n.index;t=t.slice(0,null==o?e:o)}}else n.indexOf(i,e)!=e&&(i=t.lastIndexOf(i),-1<i&&(t=t.slice(0,i)));return t+r},Nn.unescape=function(n){return(n=u(n))&&sn.test(n)?n.replace(an,y):n},Nn.uniqueId=function(n){var t=++eu;return u(n)+t},Nn.words=Te,Nn.all=ne,Nn.any=ie,Nn.contains=re,Nn.eq=he,Nn.detect=ai,Nn.foldl=yi,
Nn.foldr=di,Nn.head=Dr,Nn.include=re,Nn.inject=yi,Le(Nn,function(){var n={};return vt(Nn,function(t,r){Nn.prototype[r]||(n[r]=t)}),n}(),false),Nn.sample=ue,Nn.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return ue(t,n)}):ue(this.value())},Nn.VERSION=w,Kn("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Nn[n].placeholder=Nn}),Kn(["dropWhile","filter","map","takeWhile"],function(n,t){var r=t!=F,e=t==U;Bn.prototype[n]=function(n,u){var i=this.__filtered__,o=i&&e?new Bn(this):this.clone();
return(o.__iteratees__||(o.__iteratees__=[])).push({done:false,count:0,index:0,iteratee:mr(n,u,1),limit:-1,type:t}),o.__filtered__=i||r,o}}),Kn(["drop","take"],function(n,t){var r=n+"While";Bn.prototype[n]=function(r){var e=this.__filtered__,u=e&&!t?this.dropWhile():this.clone();return r=null==r?1:ku(su(r)||0,0),e?t?u.__takeCount__=Ou(u.__takeCount__,r):Vr(u.__iteratees__).limit=r:(u.__views__||(u.__views__=[])).push({size:r,type:n+(0>u.__dir__?"Right":"")}),u},Bn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse();
},Bn.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[r](n,t).reverse()}}),Kn(["first","last"],function(n,t){var r="take"+(t?"Right":"");Bn.prototype[n]=function(){return this[r](1).value()[0]}}),Kn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");Bn.prototype[n]=function(){return this[r](1)}}),Kn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?xt:Be;Bn.prototype[n]=function(n){return this[r](e(n))}}),Bn.prototype.compact=function(){return this.filter(Fe)},Bn.prototype.reject=function(n,t){
return n=mr(n,t,1),this.filter(function(t){return!n(t)})},Bn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return 0>n?r=this.takeRight(-n):n&&(r=this.drop(n)),t!==m&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},Bn.prototype.toArray=function(){return this.drop(0)},vt(Bn.prototype,function(n,t){var r=Nn[t];if(r){var e=/^(?:filter|map|reject)|While$/.test(t),u=/^(?:first|last)$/.test(t);Nn.prototype[t]=function(){function t(n){return n=[n],_u.apply(n,i),r.apply(Nn,n)}var i=arguments,o=this.__chain__,f=this.__wrapped__,l=!!this.__actions__.length,a=f instanceof Bn,c=i[0],s=a||Ti(f);
return s&&e&&typeof c=="function"&&1!=c.length&&(a=s=false),a=a&&!l,u&&!o?a?n.call(f):r.call(Nn,this.value()):s?(f=n.apply(a?f:new Bn(this),i),u||!l&&!f.__actions__||(f.__actions__||(f.__actions__=[])).push({func:Qr,args:[t],thisArg:Nn}),new zn(f,o)):this.thru(t)}}}),Kn("concat join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?Qe:Xe)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(n);Nn.prototype[n]=function(){
var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),vt(Bn.prototype,function(n,t){var r=Nn[t];if(r){var e=r.name;(Lu[e]||(Lu[e]=[])).push({name:t,func:r})}}),Lu[sr(null,x).name]=[{name:"wrapper",func:null}],Bn.prototype.clone=function(){var n=this.__actions__,t=this.__iteratees__,r=this.__views__,e=new Bn(this.__wrapped__);return e.__actions__=n?Dn(n):null,e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=t?Dn(t):null,
e.__takeCount__=this.__takeCount__,e.__views__=r?Dn(r):null,e},Bn.prototype.reverse=function(){if(this.__filtered__){var n=new Bn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Bn.prototype.value=function(){var n=this.__wrapped__.value();if(!Ti(n))return Lt(n,this.__actions__);var t,r=this.__dir__,e=0>r;t=n.length;for(var u=this.__views__,i=0,o=-1,f=u?u.length:0;++o<f;){var l=u[o],a=l.size;switch(l.type){case"drop":i+=a;break;case"dropRight":t-=a;break;case"take":
t=Ou(t,i+a);break;case"takeRight":i=ku(i,t-a)}}t={start:i,end:t},u=t.start,i=t.end,t=i-u,u=e?i:u-1,i=Ou(t,this.__takeCount__),f=(o=this.__iteratees__)?o.length:0,l=0,a=[];n:for(;t--&&l<i;){for(var u=u+r,c=-1,s=n[u];++c<f;){var p=o[c],h=p.iteratee,_=p.type;if(_==U){if(p.done&&(e?u>p.index:u<p.index)&&(p.count=0,p.done=false),p.index=u,!(p.done||(_=p.limit,p.done=-1<_?p.count++>=_:!h(s))))continue n}else if(p=h(s),_==F)s=p;else if(!p){if(_==$)continue n;break n}}a[l++]=s}return a},Nn.prototype.chain=function(){
return Hr(this)},Nn.prototype.commit=function(){return new zn(this.value(),this.__chain__)},Nn.prototype.plant=function(n){for(var t,r=this;r instanceof Ln;){var e=Mr(r);t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},Nn.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Bn?(this.__actions__.length&&(n=new Bn(this)),new zn(n.reverse(),this.__chain__)):this.thru(function(n){return n.reverse()})},Nn.prototype.toString=function(){return this.value()+""},Nn.prototype.run=Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){
return Lt(this.__wrapped__,this.__actions__)},Nn.prototype.collect=Nn.prototype.map,Nn.prototype.head=Nn.prototype.first,Nn.prototype.select=Nn.prototype.filter,Nn.prototype.tail=Nn.prototype.rest,Nn}var m,w="3.9.3",b=1,x=2,A=4,j=8,k=16,O=32,R=64,I=128,E=256,C=30,W="...",S=150,T=16,U=0,$=1,F=2,N="Expected a function",L="__lodash_placeholder__",z="[object Arguments]",B="[object Array]",M="[object Boolean]",P="[object Date]",q="[object Error]",D="[object Function]",K="[object Number]",V="[object Object]",Y="[object RegExp]",Z="[object String]",G="[object ArrayBuffer]",J="[object Float32Array]",X="[object Float64Array]",H="[object Int8Array]",Q="[object Int16Array]",nn="[object Int32Array]",tn="[object Uint8Array]",rn="[object Uint8ClampedArray]",en="[object Uint16Array]",un="[object Uint32Array]",on=/\b__p\+='';/g,fn=/\b(__p\+=)''\+/g,ln=/(__e\(.*?\)|\b__t\))\+'';/g,an=/&(?:amp|lt|gt|quot|#39|#96);/g,cn=/[&<>"'`]/g,sn=RegExp(an.source),pn=RegExp(cn.source),hn=/<%-([\s\S]+?)%>/g,_n=/<%([\s\S]+?)%>/g,vn=/<%=([\s\S]+?)%>/g,gn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,yn=/^\w*$/,dn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,mn=/[.*+?^${}()|[\]\/\\]/g,wn=RegExp(mn.source),bn=/[\u0300-\u036f\ufe20-\ufe23]/g,xn=/\\(\\)?/g,An=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jn=/\w*$/,kn=/^0[xX]/,On=/^\[object .+?Constructor\]$/,Rn=/^\d+$/,In=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,En=/($^)/,Cn=/['\n\r\u2028\u2029\\]/g,Wn=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),Sn=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",Tn="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseFloat parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window".split(" "),Un={};
Un[J]=Un[X]=Un[H]=Un[Q]=Un[nn]=Un[tn]=Un[rn]=Un[en]=Un[un]=true,Un[z]=Un[B]=Un[G]=Un[M]=Un[P]=Un[q]=Un[D]=Un["[object Map]"]=Un[K]=Un[V]=Un[Y]=Un["[object Set]"]=Un[Z]=Un["[object WeakMap]"]=false;var $n={};$n[z]=$n[B]=$n[G]=$n[M]=$n[P]=$n[J]=$n[X]=$n[H]=$n[Q]=$n[nn]=$n[K]=$n[V]=$n[Y]=$n[Z]=$n[tn]=$n[rn]=$n[en]=$n[un]=true,$n[q]=$n[D]=$n["[object Map]"]=$n["[object Set]"]=$n["[object WeakMap]"]=false;var Fn={leading:false,maxWait:0,trailing:false},Nn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A",
"\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u",
"\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ln={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},zn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Bn={"function":true,object:true},Mn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pn=Bn[typeof exports]&&exports&&!exports.nodeType&&exports,qn=Bn[typeof module]&&module&&!module.nodeType&&module,Dn=Bn[typeof self]&&self&&self.Object&&self,Kn=Bn[typeof window]&&window&&window.Object&&window,Vn=qn&&qn.exports===Pn&&Pn,Yn=Pn&&qn&&typeof global=="object"&&global&&global.Object&&global||Kn!==(this&&this.window)&&Kn||Dn||this,Zn=d();
typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Zn, define(function(){return Zn})):Pn&&qn?Vn?(qn.exports=Zn)._=Zn:Pn._=Zn:Yn._=Zn}).call(this);

12456
lodash.src.js Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,39 +1,33 @@
{
"name": "lodash",
"version": "1.2.0",
"description": "A low-level utility library delivering consistency, customization, performance, and extra features.",
"homepage": "http://lodash.com",
"license": "MIT",
"main": "./dist/lodash.js",
"keywords": [
"browser",
"client",
"functional",
"performance",
"server",
"speed",
"util"
],
"author": {
"name": "John-David Dalton",
"email": "john.david.dalton@gmail.com",
"web": "http://allyoucanleet.com/"
"version": "3.9.3",
"main": "lodash.src.js",
"private": true,
"devDependencies": {
"curl-amd": "0.8.12",
"dojo": "~1.10.0",
"jquery": "~1.11.0",
"platform": "~1.3.0",
"qunit-extras": "~1.4.0",
"qunitjs": "~1.18.0",
"requirejs": "~2.1.0"
},
"bugs": {
"url": "https://github.com/bestiejs/lodash/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/bestiejs/lodash.git"
},
"bin": {
"lodash": "./build.js"
},
"engines": [
"node",
"rhino"
],
"jam": {
"main": "./lodash.js"
"volo": {
"type": "directory",
"ignore": [
".*",
"*.custom.*",
"*.log",
"*.map",
"*.md",
"lodash.src.js",
"bower.json",
"component.json",
"doc",
"node_modules",
"perf",
"test",
"vendor"
]
}
}

149
perf/asset/perf-ui.js Normal file
View File

@@ -0,0 +1,149 @@
;(function(window) {
'use strict';
/** The base path of the lodash builds. */
var basePath = '../';
/** The lodash build to load. */
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
/** The other library to load. */
var other = (other = /other=([^&]+)/.exec(location.search)) && decodeURIComponent(other[1]);
/** The `ui` object. */
var ui = {};
/*--------------------------------------------------------------------------*/
/**
* Registers an event listener on an element.
*
* @private
* @param {Element} element The element.
* @param {string} eventName The name of the event.
* @param {Function} handler The event handler.
* @returns {Element} The element.
*/
function addListener(element, eventName, handler) {
if (typeof element.addEventListener != 'undefined') {
element.addEventListener(eventName, handler, false);
} else if (typeof element.attachEvent != 'undefined') {
element.attachEvent('on' + eventName, handler);
}
}
/*--------------------------------------------------------------------------*/
// Initialize controls.
addListener(window, 'load', function() {
function eventHandler(event) {
var buildIndex = buildList.selectedIndex,
otherIndex = otherList.selectedIndex,
search = location.search.replace(/^\?|&?(?:build|other)=[^&]*&?/g, '');
if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
location.href =
location.href.split('?')[0] + '?' +
(search ? search + '&' : '') +
'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' +
'other=' + (otherIndex < 0 ? other : otherList[otherIndex].value);
}
var span1 = document.createElement('span');
span1.style.cssText = 'float:right';
span1.innerHTML =
'<label for="perf-build">Build: </label>' +
'<select id="perf-build">' +
'<option value="lodash-compat">lodash (compat)</option>' +
'<option value="lodash-modern">lodash (modern)</option>' +
'<option value="lodash-custom-dev">lodash (custom development)</option>' +
'<option value="lodash-custom">lodash (custom production)</option>' +
'</select>';
var span2 = document.createElement('span');
span2.style.cssText = 'float:right';
span2.innerHTML =
'<label for="perf-other">Other Library: </label>' +
'<select id="perf-other">' +
'<option value="underscore-dev">Underscore (development)</option>' +
'<option value="underscore">Underscore (production)</option>' +
'<option value="lodash-compat">lodash (compat)</option>' +
'<option value="lodash-modern">lodash (modern)</option>' +
'<option value="lodash-custom-dev">lodash (custom development)</option>' +
'<option value="lodash-custom">lodash (custom production)</option>' +
'</select>';
var buildList = span1.lastChild,
otherList = span2.lastChild,
toolbar = document.getElementById('perf-toolbar');
toolbar.appendChild(span2);
toolbar.appendChild(span1);
buildList.selectedIndex = (function() {
switch (build) {
case 'lodash-compat': return 0;
case 'lodash-custom-dev': return 2;
case 'lodash-custom': return 3;
case 'lodash-modern':
case null: return 1;
}
return -1;
}());
otherList.selectedIndex = (function() {
switch (other) {
case 'underscore-dev': return 0;
case 'lodash-compat': return 2;
case 'lodash-modern': return 3;
case 'lodash-custom-dev': return 4;
case 'lodash-custom': return 5;
case 'underscore':
case null: return 1;
}
return -1;
}());
addListener(buildList, 'change', eventHandler);
addListener(otherList, 'change', eventHandler);
});
// The lodash build file path.
ui.buildPath = (function() {
var result;
switch (build) {
case 'lodash-compat': result = 'lodash.compat.min.js'; break;
case 'lodash-custom-dev': result = 'lodash.custom.js'; break;
case 'lodash-custom': result = 'lodash.custom.min.js'; break;
case null: build = 'lodash-modern';
case 'lodash-modern': result = 'lodash.min.js'; break;
default: return build;
}
return basePath + result;
}());
// The other library file path.
ui.otherPath = (function() {
var result;
switch (other) {
case 'lodash-compat': result = 'lodash.compat.min.js'; break;
case 'lodash-modern': result = 'lodash.min.js'; break;
case 'lodash-custom-dev': result = 'lodash.custom.js'; break;
case 'lodash-custom': result = 'lodash.custom.min.js'; break;
case 'underscore-dev': result = 'vendor/underscore/underscore.js'; break;
case null: other = 'underscore';
case 'underscore': result = 'vendor/underscore/underscore-min.js'; break;
default: return other;
}
return basePath + result;
}());
ui.urlParams = { 'build': build, 'other': other };
window.ui = ui;
}(this));

View File

@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Lo-Dash Performance Suite</title>
<title>lodash Performance Suite</title>
<style>
html, body {
margin: 0;
@@ -28,19 +28,19 @@
</head>
<body>
<div id="perf-toolbar"></div>
<script src="../vendor/platform.js/platform.js"></script>
<script src="../lodash.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="../lodash.src.js"></script>
<script src="../vendor/benchmark.js/benchmark.js"></script>
<script src="../vendor/firebug-lite/src/firebug-lite-debug.js"></script>
<script src="perf-ui.js"></script>
<script src="./asset/perf-ui.js"></script>
<script>
document.write('<script src="../' + ui.buildPath + '"><\/script>');
document.write('<script src="' + ui.buildPath + '"><\/script>');
</script>
<script>
var lodash = _.noConflict();
</script>
<script>
document.write('<script src="../' + ui.otherPath + '"><\/script>');
document.write('<script src="' + ui.otherPath + '"><\/script>');
</script>
<script src="perf.js"></script>
<script>
@@ -69,8 +69,8 @@
// is the applet permitted?
if (!/[?&]nojava=true(?:&|$)/.test(location.search)) {
// is the applet really needed?
while (!(measured = new Date - begin)) { }
if (measured != 1 && !((perfNow = window.performance) && typeof (perfNow.now || perfNow.webkitNow) == 'function')) {
while (!(measured = new Date - begin)) {}
if (measured > 1 && !((perfNow = window.performance) && typeof (perfNow.now || perfNow.webkitNow) == 'function')) {
// load applet
document.write('<applet code="nano" archive="../vendor/benchmark.js/nano.jar"></applet>');
}

View File

@@ -1,136 +0,0 @@
;(function(window) {
'use strict';
/** The Lo-Dash build to load */
var build = (/build=([^&]+)/.exec(location.search) || [])[1];
/** The other library to load */
var other = (/other=([^&]+)/.exec(location.search) || [])[1];
/** The `ui` object */
var ui = {};
/*--------------------------------------------------------------------------*/
/**
* Registers an event listener on an element.
*
* @private
* @param {Element} element The element.
* @param {String} eventName The name of the event.
* @param {Function} handler The event handler.
* @returns {Element} The element.
*/
function addListener(element, eventName, handler) {
if (typeof element.addEventListener != 'undefined') {
element.addEventListener(eventName, handler, false);
} else if (typeof element.attachEvent != 'undefined') {
element.attachEvent('on' + eventName, handler);
}
}
/*--------------------------------------------------------------------------*/
// expose Lo-Dash build file path
ui.buildPath = (function() {
switch (build) {
case 'lodash-dev': return 'dist/lodash.compat.js';
case 'lodash-modern': return 'dist/lodash.min.js';
case 'lodash-underscore': return 'dist/lodash.underscore.min.js';
case 'lodash-custom': return 'lodash.custom.min.js';
}
return 'dist/lodash.compat.min.js';
}());
// expose other library file path
ui.otherPath = (function() {
switch (other) {
case 'lodash-dev': return 'dist/lodash.compat.js';
case 'lodash-prod': return 'dist/lodash.compat.min.js';
case 'lodash-modern': return 'dist/lodash.min.js';
case 'lodash-underscore': return 'dist/lodash.underscore.min.js';
case 'lodash-custom': return 'lodash.custom.min.js';
case 'underscore-dev': return 'vendor/underscore/underscore.js';
}
return 'vendor/underscore/underscore-min.js';
}());
// initialize controls
addListener(window, 'load', function() {
function eventHandler(event) {
var search = location.search.replace(/^\?|&?(?:build|other)=[^&]*&?/g, '');
if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
location.href =
location.href.split('?')[0] + '?' +
(search ? search + '&' : '') +
'build=' + buildList[buildList.selectedIndex].value + '&' +
'other=' + otherList[otherList.selectedIndex].value;
}
var span1 = document.createElement('span');
span1.style.cssText = 'float:right';
span1.innerHTML =
'<label for="perf-build">Build: </label>' +
'<select id="perf-build">' +
'<option value="lodash-dev">Lo-Dash</option>' +
'<option value="lodash-prod">Lo-Dash (minified)</option>' +
'<option value="lodash-modern">Lo-Dash (modern)</option>' +
'<option value="lodash-underscore">Lo-Dash (underscore)</option>' +
'<option value="lodash-custom">Lo-Dash (custom)</option>' +
'</select>';
var span2 = document.createElement('span');
span2.style.cssText = 'float:right';
span2.innerHTML =
'<label for="perf-other">Other Library: </label>' +
'<select id="perf-other">' +
'<option value="underscore-dev">Underscore</option>' +
'<option value="underscore-prod">Underscore (minified)</option>' +
'<option value="lodash-dev">Lo-Dash</option>' +
'<option value="lodash-prod">Lo-Dash (minified)</option>' +
'<option value="lodash-modern">Lo-Dash (modern)</option>' +
'<option value="lodash-underscore">Lo-Dash (underscore)</option>' +
'<option value="lodash-custom">Lo-Dash (custom)</option>' +
'</select>';
var buildList = span1.lastChild,
otherList = span2.lastChild,
toolbar = document.getElementById('perf-toolbar');
toolbar.appendChild(span2);
toolbar.appendChild(span1);
buildList.selectedIndex = (function() {
switch (build) {
case 'lodash-dev': return 0;
case 'lodash-modern': return 2;
case 'lodash-underscore': return 3;
case 'lodash-custom': return 4;
}
return 1;
}());
otherList.selectedIndex = (function() {
switch (other) {
case 'underscore-dev': return 0;
case 'lodash-dev': return 2;
case 'lodash-prod': return 3;
case 'lodash-modern': return 4;
case 'lodash-underscore': return 5;
case 'lodash-custom': return 6;
}
return 1;
}());
addListener(buildList, 'change', eventHandler);
addListener(otherList, 'change', eventHandler);
});
// expose `ui`
window.ui = ui;
}(this));

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,12 @@
cd "$(dirname "$0")"
echo "Running performance suite in node..."
node perf.js ../dist/lodash.js && node perf.js ../dist/lodash.min.js
node perf.js ../lodash.js && node perf.js ../lodash.min.js
for cmd in rhino "rhino -require" narwhal ringo phantomjs; do
echo ""
echo "Running performance suite in $cmd..."
$cmd perf.js ../dist/lodash.compat.js && $cmd perf.js ../dist/lodash.compat.min.js
$cmd perf.js ../lodash.src.js
done
echo ""

157
test/asset/set.js Normal file
View File

@@ -0,0 +1,157 @@
;(function() {
/** Used to determine if values are of the language type Object. */
var objectTypes = {
'function': true,
'object': true
};
/** Used as the `Set#toString` return value. */
var nativeString = String(Object.prototype.toString).replace(/toString/g, 'Set');
/** Detect free variable `exports`. */
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
/** Detect free variable `global` from Node.js. */
var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;
/** Detect free variable `self`. */
var freeSelf = objectTypes[typeof self] && self && self.Object && self;
/** Detect free variable `window`. */
var freeWindow = objectTypes[typeof window] && window && window.Object && window;
/**
* Used as a reference to the global object.
*
* The `this` value is used if it is the global object to avoid Greasemonkey's
* restricted `window` object, otherwise the `window` object is used.
*/
var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
/*--------------------------------------------------------------------------*/
/**
* Installs `Set` on the given `context` object.
*
* @memberOf exports
* @param {Object} context The context object.
*/
function runInContext(context) {
/**
* Creates a `Set` object.
*/
function Set() {
this.__cache__ = {};
}
/**
* Gets the index at which the first occurrence of `value` is found using
* strict equality for comparisons, i.e. `===`.
*
* @private
* @param {Array} array The array to search.
* @param {*} value The value to search for.
* @returns {number} Returns the index of the matched value or `-1`.
*/
function indexOf(array, value) {
var index = -1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
/**
* Checks if `value` is in the set.
*
* @memberOf Set
* @param {*} value The value to search for.
* @returns {boolean} Returns `true` if `value` is found, else `false`.
*/
function has(value) {
var type = typeof value,
cache = this.__cache__;
if (type == 'boolean' || value == null) {
return cache[value] || false;
}
if (type != 'number' && type != 'string') {
type = 'object';
}
var key = type == 'number' ? value : '_' + value;
cache = (cache = cache[type]) && cache[key];
return type == 'object'
? (cache && indexOf(cache, value) > -1 ? true : false)
: (cache || false);
}
/**
* Adds `value` to the set.
*
* @memberOf Set
* @param {*} value The value to add.
*/
function add(value) {
var cache = this.__cache__,
type = typeof value;
if (type == 'boolean' || value == null) {
cache[value] = true;
} else {
if (type != 'number' && type != 'string') {
type = 'object';
}
var key = type == 'number' ? value : '_' + value,
typeCache = cache[type] || (cache[type] = {});
if (type == 'object') {
var array = typeCache[key];
if (array) {
array.push(value);
} else {
typeCache[key] = [value];
}
} else {
typeCache[key] = true;
}
}
}
/**
* Produces the `toString` result of `Set`.
*
* @static
* @memberOf Set
* @returns {string} Returns the string result.
*/
function toString() {
return nativeString;
}
Set.toString = toString;
Set.prototype.add = add;
Set.prototype.has = has;
if (!root.Set) {
context.Set = Set;
}
}
/*--------------------------------------------------------------------------*/
if (freeExports) {
freeExports.runInContext = runInContext;
} else {
runInContext(root);
}
}.call(this));

173
test/asset/test-ui.js Normal file
View File

@@ -0,0 +1,173 @@
;(function(window) {
'use strict';
/** The base path of the lodash builds. */
var basePath = '../';
/** The lodash build to load. */
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
/** The module loader to use. */
var loader = (loader = /loader=([^&]+)/.exec(location.search)) && decodeURIComponent(loader[1]);
/** The `ui` object. */
var ui = {};
/*--------------------------------------------------------------------------*/
/**
* Registers an event listener on an element.
*
* @private
* @param {Element} element The element.
* @param {string} eventName The name of the event.
* @param {Function} handler The event handler.
* @returns {Element} The element.
*/
function addListener(element, eventName, handler) {
if (typeof element.addEventListener != 'undefined') {
element.addEventListener(eventName, handler, false);
} else if (typeof element.attachEvent != 'undefined') {
element.attachEvent('on' + eventName, handler);
}
}
/*--------------------------------------------------------------------------*/
// Initialize controls.
addListener(window, 'load', function() {
function eventHandler(event) {
var buildIndex = buildList.selectedIndex,
loaderIndex = loaderList.selectedIndex,
search = location.search.replace(/^\?|&?(?:build|loader)=[^&]*&?/g, '');
if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
location.href =
location.href.split('?')[0] + '?' +
(search ? search + '&' : '') +
'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' +
'loader=' + (loaderIndex < 0 ? loader : loaderList[loaderIndex].value);
}
function init() {
var toolbar = document.getElementById('qunit-testrunner-toolbar');
if (!toolbar) {
setTimeout(init, 15);
return;
}
toolbar.appendChild(span1);
toolbar.appendChild(span2);
buildList.selectedIndex = (function() {
switch (build) {
case 'lodash-compat': return 1;
case 'lodash-modern-dev': return 2;
case 'lodash-modern': return 3;
case 'lodash-custom-dev': return 4;
case 'lodash-custom': return 5;
case 'lodash-compat-dev':
case null: return 0;
}
return -1;
}());
loaderList.selectedIndex = (function() {
switch (loader) {
case 'curl': return 1;
case 'dojo': return 2;
case 'requirejs': return 3;
case 'none':
case null: return 0;
}
return -1;
}());
addListener(buildList, 'change', eventHandler);
addListener(loaderList, 'change', eventHandler);
}
var span1 = document.createElement('span');
span1.style.cssText = 'float:right';
span1.innerHTML =
'<label for="qunit-build">Build: </label>' +
'<select id="qunit-build">' +
'<option value="lodash-compat-dev">lodash (compat development)</option>' +
'<option value="lodash-compat">lodash (compat production)</option>' +
'<option value="lodash-modern-dev">lodash (modern development)</option>' +
'<option value="lodash-modern">lodash (modern production)</option>' +
'<option value="lodash-custom-dev">lodash (custom development)</option>' +
'<option value="lodash-custom">lodash (custom production)</option>' +
'</select>';
var span2 = document.createElement('span');
span2.style.cssText = 'float:right';
span2.innerHTML =
'<label for="qunit-loader">Loader: </label>' +
'<select id="qunit-loader">' +
'<option value="none">None</option>' +
'<option value="curl">Curl</option>' +
'<option value="dojo">Dojo</option>' +
'<option value="requirejs">RequireJS</option>' +
'</select>';
var buildList = span1.lastChild,
loaderList = span2.lastChild;
setTimeout(function() {
ui.timing.loadEventEnd = +new Date;
}, 1);
init();
});
// Used to indicate testing a foreign file.
ui.isForeign = RegExp('^(\\w+:)?//').test(build);
// Used to indicate testing a modularized build.
ui.isModularize = /\b(?:amd|commonjs|es6?|node|npm|(index|main)\.js)\b/.test([location.pathname, location.search]);
// Used to indicate testing in Sauce Labs' automated test cloud.
ui.isSauceLabs = location.port == '9001';
// Used to indicate that lodash is in strict mode.
ui.isStrict = /\bes6?\b/.test([location.pathname, location.search]);
// The lodash build file path.
ui.buildPath = (function() {
var result;
switch (build) {
case 'lodash-compat': result = 'lodash.compat.min.js'; break;
case 'lodash-modern-dev': result = 'lodash.js'; break;
case 'lodash-modern': result = 'lodash.min.js'; break;
case 'lodash-custom-dev': result = 'lodash.custom.js'; break;
case 'lodash-custom': result = 'lodash.custom.min.js'; break;
case null: build = 'lodash-compat-dev';
case 'lodash-compat-dev': result = 'lodash.src.js'; break;
default: return build;
}
return basePath + result;
}());
// The module loader file path.
ui.loaderPath = (function() {
var result;
switch (loader) {
case 'curl': result = 'node_modules/curl-amd/dist/curl-kitchen-sink/curl.js'; break;
case 'dojo': result = 'node_modules/dojo/dojo.js'; break;
case 'requirejs': result = 'node_modules/requirejs/require.js'; break;
case null: loader = 'none'; return '';
default: return loader;
}
return basePath + result;
}());
ui.urlParams = { 'build': build, 'loader': loader };
ui.timing = { 'loadEventEnd': 0 };
window.ui = ui;
}(this));

102
test/asset/weakmap.js Normal file
View File

@@ -0,0 +1,102 @@
;(function() {
/** Used to determine if values are of the language type Object. */
var objectTypes = {
'function': true,
'object': true
};
/** Used as the `WeakMap#toString` return value. */
var nativeString = String(Object.prototype.toString).replace(/toString/g, 'WeakMap');
/** Detect free variable `exports`. */
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
/** Detect free variable `global` from Node.js. */
var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;
/** Detect free variable `self`. */
var freeSelf = objectTypes[typeof self] && self && self.Object && self;
/** Detect free variable `window`. */
var freeWindow = objectTypes[typeof window] && window && window.Object && window;
/**
* Used as a reference to the global object.
*
* The `this` value is used if it is the global object to avoid Greasemonkey's
* restricted `window` object, otherwise the `window` object is used.
*/
var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
/*--------------------------------------------------------------------------*/
/**
* Installs `WeakMap` on the given `context` object.
*
* @memberOf exports
* @param {Object} context The context object.
*/
function runInContext(context) {
/**
* Creates a `WeakMap` object.
*/
function WeakMap() {
// No operation performed.
}
/**
* Gets the value associated with the given key.
*
* @memberOf WeakMap
* @param {Object} key The key object.
* @returns {*} Returns the associated value, else `undefined`.
*/
function get(key) {
return key.__weakmap__;
}
/**
* Sets a value for the given key.
*
* @memberOf WeakMap
* @param {Object} key The key object.
* @param {*} value The value to set.
*/
function set(key, value) {
key.__weakmap__ = value;
return this;
}
/**
* Produces the `toString` result of `WeakMap`.
*
* @static
* @memberOf WeakMap
* @returns {string} Returns the string result.
*/
function toString() {
return nativeString;
}
WeakMap.toString = toString;
WeakMap.prototype.get = get;
WeakMap.prototype.set = set;
if (!root.WeakMap) {
context.WeakMap = WeakMap;
}
}
/*--------------------------------------------------------------------------*/
if (freeExports) {
freeExports.runInContext = runInContext;
} else {
runInContext(root);
}
}.call(this));

12
test/asset/worker.js Normal file
View File

@@ -0,0 +1,12 @@
self.console || (self.console = { 'log': function() {} });
addEventListener('message', function(e) {
if (e.data) {
try {
importScripts('../' + e.data);
} catch(e) {
self._ = { 'VERSION': e.message };
}
postMessage(_.VERSION);
}
}, false);

View File

@@ -3,52 +3,131 @@
<head>
<meta charset="utf-8">
<title>Backbone Test Suite</title>
<link rel="stylesheet" href="../vendor/qunit/qunit/qunit.css">
<style>
body > #qunit-header {
display: none;
}
</style>
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
</head>
<body>
<div id="qunit"></div>
<h1 id="qunit-header"></h1>
<div id="qunit-fixture">
<div id='testElement'>
<h1>Test</h1>
</div>
</div>
<script src="../vendor/json3/lib/json3.js"></script>
<script src="../vendor/jquery/jquery.js"></script>
<script src="../vendor/platform.js/platform.js"></script>
<script src="../vendor/qunit/qunit/qunit.js"></script>
<script src="test-ui.js"></script>
<script src="../lodash.js"></script>
<script>
var lodash = _.noConflict();
document.write('<script src="../' + ui.buildPath + '"><\/script>');
</script>
<script>
_.mixin({
'debounce': lodash.debounce,
'defer': lodash.defer
});
if (!_.chain) {
_.mixin({
'chain': function(value) {
return new _(value);
// Avoid reporting tests to Sauce Labs when script errors occur.
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
QUnit.config.done.length = 0;
}
});
global_test_results = { 'message': message };
};
}
</script>
<script src="../vendor/backbone/backbone.js"></script>
<script src="../vendor/backbone/test/environment.js"></script>
<script src="../vendor/backbone/test/noconflict.js"></script>
<script src="../vendor/backbone/test/events.js"></script>
<script src="../vendor/backbone/test/model.js"></script>
<script src="../vendor/backbone/test/collection.js"></script>
<script src="../vendor/backbone/test/router.js"></script>
<script src="../vendor/backbone/test/view.js"></script>
<script src="../vendor/backbone/test/sync.js"></script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
<script src="../vendor/json-js/json2.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="./asset/test-ui.js"></script>
<script src="../lodash.src.js"></script>
<script>
var mixinPrereqs = (function() {
var lodash = _.noConflict();
return function(_) {
_.mixin({
'debounce': _.debounce || lodash.debounce,
'defer': _.defer || lodash.defer,
'pluck': _.pluck || lodash.pluck
});
};
}());
QUnit.config.asyncRetries = 10;
QUnit.config.hidepassed = true;
// Load test scripts.
document.write(ui.urlParams.loader != 'none'
? '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
: ([
'<script src="' + ui.buildPath + '"><\/script>',
'<script src="../node_modules/jquery/dist/jquery.js"><\/script>',
'<script src="../vendor/backbone/backbone.js"><\/script>',
'<script src="../vendor/backbone/test/setup/dom-setup.js"><\/script>',
'<script src="../vendor/backbone/test/setup/environment.js"><\/script>',
'<script src="../vendor/backbone/test/noconflict.js"><\/script>',
'<script src="../vendor/backbone/test/events.js"><\/script>',
'<script src="../vendor/backbone/test/model.js"><\/script>',
'<script src="../vendor/backbone/test/collection.js"><\/script>',
'<script src="../vendor/backbone/test/router.js"><\/script>',
'<script src="../vendor/backbone/test/view.js"><\/script>',
'<script src="../vendor/backbone/test/sync.js"><\/script>'
].join('\n'))
);
</script>
<script>
(function() {
if (window.curl) {
curl.config({ 'apiName': 'require' });
}
if (!window.require) {
mixinPrereqs(_);
return;
}
var reBasename = /[\w.-]+$/,
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
modulePath = ui.buildPath.replace(/\.js$/, ''),
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
moduleMain = modulePath.match(reBasename)[0],
uid = +new Date;
function getConfig() {
var result = {
'baseUrl': './',
'urlArgs': 't=' + uid++,
'waitSeconds': 0,
'paths': {
'backbone': '../vendor/backbone/backbone',
'jquery': '../node_modules/jquery/dist/jquery'
},
'packages': [{
'name': 'test',
'location': '../vendor/backbone/test',
'config': {
// Work around no global being exported.
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
}]
};
if (ui.isModularize) {
result.packages.push({
'name': 'underscore',
'location': locationPath,
'main': moduleMain
});
} else {
result.paths.underscore = modulePath;
}
return result;
}
QUnit.config.autostart = false;
require(getConfig(), ['underscore', 'backbone'], function(lodash) {
mixinPrereqs(lodash);
if (ui.isModularize) {
window._ = lodash;
}
require(getConfig(), [
'test/setup/dom-setup',
'test/setup/environment',
'test/noconflict',
'test/events',
'test/model',
'test/collection',
'test/router',
'test/view',
'test/sync'
], function() {
QUnit.start();
});
});
}());
</script>
</body>
</html>

View File

@@ -2,8 +2,8 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Lo-Dash Test Suite</title>
<link rel="stylesheet" href="../vendor/qunit/qunit/qunit.css">
<title>lodash Test Suite</title>
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
<style>
#exports {
display: none;
@@ -11,77 +11,385 @@
</style>
</head>
<body>
<script src="../vendor/qunit/qunit/qunit.js"></script>
<script src="../vendor/platform.js/platform.js"></script>
<script src="test-ui.js"></script>
<script>
// Avoid reporting tests to Sauce Labs when script errors occur.
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
QUnit.config.done.length = 0;
}
global_test_results = { 'message': message };
};
}
</script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="./asset/set.js"></script>
<script src="./asset/weakmap.js"></script>
<script src="./asset/test-ui.js"></script>
<div id="qunit"></div>
<div id="exports"></div>
<script>
// set a bad shim
Object._keys = Object.keys;
Object.keys = function() { return []; };
var setProperty = (function() {
var _defineProperty = Object.defineProperty;
return function(object, key, value) {
try {
_defineProperty(object, key, {
'configurable': true,
'enumerable': false,
'writable': true,
'value': value
});
} catch(e) {
object[key] = value;
}
};
}());
// load Lo-Dash and expose it to the bad `Object.keys` shim
document.write('<script src="../' + ui.buildPath + '"><\/script>');
function addBizarroMethods() {
var funcProto = Function.prototype,
objectProto = Object.prototype,
stringProto = String.prototype;
var hasOwnProperty = objectProto.hasOwnProperty,
fnToString = funcProto.toString,
nativeString = fnToString.call(objectProto.toString),
noop = function() {},
parseInt = window.parseInt,
propertyIsEnumerable = objectProto.propertyIsEnumerable,
reToString = /toString/g,
whitespace = ' \t\x0B\f\xA0\ufeff\n\r\u2028\u2029\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000';
function constant(value) {
return function() {
return value;
};
}
function createToString(funcName) {
return constant(nativeString.replace(reToString, funcName));
}
// Allow bypassing native checks.
setProperty(funcProto, 'toString', (function() {
function wrapper() {
setProperty(funcProto, 'toString', fnToString);
var result = hasOwnProperty.call(this, 'toString') ? this.toString() : fnToString.call(this);
setProperty(funcProto, 'toString', wrapper);
return result;
}
return wrapper;
}()));
// Add prototype extensions.
funcProto._method = noop;
// Set bad shims.
setProperty(Array, '_isArray', Array.isArray);
setProperty(Array, 'isArray', noop);
setProperty(Date, '_now', Date.now);
setProperty(Date, 'now', noop);
setProperty(Object, '_getPrototypeOf', Object.getPrototypeOf);
setProperty(Object, 'getPrototypeOf', noop);
setProperty(Object, '_keys', Object.keys);
setProperty(Object, 'keys', noop);
setProperty(objectProto, '_propertyIsEnumerable', propertyIsEnumerable);
setProperty(objectProto, 'propertyIsEnumerable', function(key) {
if (key == '1' && this && typeof this == 'object' &&
hasOwnProperty.call(this, 'callee') &&
!propertyIsEnumerable.call(this, 'callee') &&
this.length === 2 && this[0] === 1 && this[1] === 0) {
throw new Error;
}
return propertyIsEnumerable.call(this, key);
});
setProperty(Number, '_isFinite', Number.isFinite);
setProperty(Number, 'isFinite', noop);
setProperty(window, '_ArrayBuffer', window.ArrayBuffer);
if (window.ArrayBuffer && window.Uint8Array) {
ArrayBuffer = (function(_ArrayBuffer) {
function ArrayBuffer(byteLength) {
var buffer = new _ArrayBuffer(byteLength);
if (!byteLength) {
setProperty(buffer, 'slice', buffer.slice ? null : bufferSlice);
}
return buffer;
}
function bufferSlice() {
var newBuffer = new _ArrayBuffer(this.byteLength),
view = new Uint8Array(newBuffer);
view.set(new Uint8Array(this));
return newBuffer;
}
setProperty(ArrayBuffer, 'toString', createToString('ArrayBuffer'));
setProperty(bufferSlice, 'toString', createToString('slice'));
return ArrayBuffer;
}(_ArrayBuffer));
}
if (!window.Float64Array && window.Uint8Array) {
Float64Array = (function() {
function Float64Array(buffer, byteOffset, length) {
return arguments.length == 1
? new Uint8Array(buffer)
: new Uint8Array(buffer, byteOffset || 0, length || buffer.byteLength);
}
setProperty(Float64Array, 'BYTES_PER_ELEMENT', 8);
setProperty(Float64Array, 'toString', createToString('Float64Array'));
return Float64Array;
}());
}
setProperty(window, '_Set', window.Set);
setProperty(window, 'Set', noop);
setProperty(window, '_WeakMap', window.WeakMap);
setProperty(window, 'WeakMap', noop);
setProperty(window, '_parseInt', parseInt);
setProperty(window, 'parseInt', (function() {
var checkStr = whitespace + '08',
isFaked = parseInt(checkStr) != 8,
reHexPrefix = /^0[xX]/,
reTrim = RegExp('^[' + whitespace + ']+|[' + whitespace + ']+$');
return function(value, radix) {
if (value == checkStr && !isFaked) {
isFaked = true;
return 0;
}
value = String(value == null ? '' : value).replace(reTrim, '');
return parseInt(value, +radix || (reHexPrefix.test(value) ? 16 : 10));
};
}()));
// Fake lack of DOM support.
setProperty(document, '_createDocumentFragment', document.createDocumentFragment);
document.createDocumentFragment = noop;
// Fake `WinRTError`.
setProperty(window, 'WinRTError', Error);
// Fake free variable `global`.
setProperty(window, 'exports', window);
setProperty(window, 'global', window);
setProperty(window, 'module', {});
}
function removeBizarroMethods() {
var funcProto = Function.prototype,
objectProto = Object.prototype,
stringProto = String.prototype;
if (Array._isArray) {
setProperty(Array, 'isArray', Array._isArray);
} else {
delete Array.isArray;
}
if (Date._now) {
setProperty(Date, 'now', Date._now);
} else {
delete Date.now;
}
if (Object._getPrototypeOf) {
setProperty(Object, 'getPrototypeOf', Object._getPrototypeOf);
} else {
delete Object.getPrototypeOf;
}
if (Object._keys) {
setProperty(Object, 'keys', Object._keys);
} else {
delete Object.keys;
}
if (Number._isFinite) {
setProperty(Number, 'isFinite', Number._isFinite);
} else {
delete Number.isFinite;
}
if (window._ArrayBuffer) {
ArrayBuffer = _ArrayBuffer;
}
setProperty(window, '_ArrayBuffer', undefined);
if (window._Set) {
Set = _Set;
}
setProperty(window, '_Set', undefined);
if (window._WeakMap) {
WeakMap = _WeakMap;
}
setProperty(window, '_WeakMap', undefined);
setProperty(window, 'parseInt', window._parseInt);
setProperty(window, '_parseInt', undefined);
document.createDocumentFragment = document._createDocumentFragment;
setProperty(document, '_createDocumentFragment', undefined);
setProperty(window, 'WinRTError', undefined);
setProperty(window, 'exports', undefined);
setProperty(window, 'global', undefined);
setProperty(window, 'module', undefined);
setProperty(objectProto, 'propertyIsEnumerable', objectProto._propertyIsEnumerable);
delete Array._isArray;
delete Date._now;
delete Object._getPrototypeOf;
delete Object._keys;
delete funcProto._method;
delete objectProto._propertyIsEnumerable;
}
// Load lodash to expose it to the bad extensions/shims.
if (!ui.isModularize) {
addBizarroMethods();
document.write('<script src="' + ui.buildPath + '"><\/script>');
}
</script>
<script>
// store Lo-Dash to test for bad shim detection
var lodashBadShim = _;
// restore nativeKeys
Object.keys = Object._keys;
delete Object._keys;
// load Lo-Dash again to overwrite the existing `_` value
document.write('<script src="../' + ui.buildPath + '"><\/script>');
// load test.js if not using require.js
document.write(QUnit.urlParams.norequire
? '<script src="test.js"><\/script>'
: '<script src="../vendor/requirejs/require.js"><\/script>'
// Store lodash to test for bad extensions/shims.
if (!ui.isModularize) {
var lodashBizarro = window._;
window._ = undefined;
removeBizarroMethods();
}
// Load test scripts.
document.write((ui.isForeign || ui.urlParams.loader == 'none')
? '<script src="' + ui.buildPath + '"><\/script><script src="test.js"><\/script>'
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
);
</script>
<script>
// load Lo-Dash as a module
var lodashModule,
shimmedModule,
underscoreModule;
window.require && require(
(function() {
var modulePath = ui.buildPath.replace(/\.js$/, '');
return {
'baseUrl': '../vendor/requirejs/',
'urlArgs': 't=' + (+new Date),
'paths': {
'lodash': '../../' + modulePath,
'shimmed': './../../' + modulePath,
'underscore': '../underscore/../../' + modulePath
},
'shim': {
'shimmed': {
'exports': '_'
}
}
};
}()),
['lodash', 'shimmed', 'underscore'], function(lodash, shimmed, underscore) {
if (lodash && lodash.noConflict) {
lodashModule = lodash.noConflict();
lodashModule.moduleName = 'lodash';
if (window.curl) {
curl.config({ 'apiName': 'require' });
}
if (shimmed.noConflict) {
shimmedModule = shimmed.noConflict();
shimmedModule.moduleName = 'shimmed';
if (ui.isForeign || !window.require) {
return;
}
if (underscore && underscore.noConflict) {
underscoreModule = underscore.noConflict();
underscoreModule.moduleName = 'underscore';
}
require(['test.js']);
});
var reBasename = /[\w.-]+$/,
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
modulePath = ui.buildPath.replace(/\.js$/, ''),
moduleMain = modulePath.match(reBasename)[0],
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
shimmedLocationPath = './abc/../' + locationPath,
underscoreLocationPath = './xyz/../' + locationPath,
uid = +new Date;
// set a more readable browser name
function getConfig() {
var result = {
'baseUrl': './',
'urlArgs': 't=' + uid++,
'waitSeconds': 0,
'paths': {},
'packages': [{
'name': 'test',
'location': basePath + 'test',
'main': 'test',
'config': {
// Work around no global being exported.
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
}],
'shim': {
'shimmed': {
'exports': '_'
}
}
};
if (ui.isModularize) {
result.packages.push({
'name': 'lodash',
'location': locationPath,
'main': moduleMain
}, {
'name': 'shimmed',
'location': shimmedLocationPath,
'main': moduleMain
}, {
'name': 'underscore',
'location': underscoreLocationPath,
'main': moduleMain
});
} else {
result.paths.lodash = modulePath;
result.paths.shimmed = shimmedLocationPath + '/' + moduleMain;
result.paths.underscore = underscoreLocationPath + '/' + moduleMain;
}
return result;
}
function loadTests() {
require(getConfig(), ['test'], function() {
QUnit.start();
});
}
function loadModulesAndTests() {
require(getConfig(), ['lodash', 'shimmed', 'underscore'], function(lodash, shimmed, underscore) {
lodashModule = lodash;
lodashModule.moduleName = 'lodash';
if (shimmed) {
shimmedModule = shimmed.result(shimmed, 'noConflict') || shimmed;
shimmedModule.moduleName = 'shimmed';
}
if (underscore) {
underscoreModule = underscore.result(underscore, 'noConflict') || underscore;
underscoreModule.moduleName = 'underscore';
}
if (ui.isModularize) {
window._ = lodash;
}
if (ui.isModularize) {
require(getConfig(), [
'lodash/internal/baseEach',
'lodash/internal/isIndex',
'lodash/internal/isIterateeCall',
'lodash/internal/isLength'
], function(baseEach, isIndex, isIterateeCall, isLength) {
lodash._baseEach = baseEach;
lodash._isIndex = isIndex;
lodash._isIterateeCall = isIterateeCall;
lodash._isLength = isLength;
loadTests();
});
} else {
loadTests();
}
});
}
QUnit.config.autostart = false;
if (window.requirejs) {
addBizarroMethods();
require(getConfig(), ['lodash'], function(lodash) {
lodashBizarro = lodash.result(lodash, 'noConflict') || lodash;
delete requirejs.s.contexts._;
removeBizarroMethods();
loadModulesAndTests();
});
} else {
loadModulesAndTests();
}
}());
// Set a more readable browser name.
window.onload = function() {
var timeoutId = setInterval(function() {
var ua = document.getElementById('qunit-userAgent');
@@ -89,7 +397,7 @@
ua.innerHTML = platform;
clearInterval(timeoutId);
}
}, 15);
}, 16);
};
</script>
</body>

16
test/run-test.sh Executable file → Normal file
View File

@@ -1,17 +1,13 @@
cd "$(dirname "$0")"
for cmd in rhino "rhino -require" narwhal ringo phantomjs; do
echo "Testing in $cmd..."
$cmd test.js ../dist/lodash.compat.js && $cmd test.js ../dist/lodash.compat.min.js
echo ""
done
echo "Testing in node..."
node test.js ../dist/lodash.js && node test.js ../dist/lodash.min.js
node test.js ../lodash.src.js
echo ""
echo "Testing build..."
node test-build.js
for cmd in rhino "rhino -require" ringo phantomjs; do
echo ""
echo "Testing in $cmd..."
$cmd test.js ../lodash.src.js
done
echo ""
echo "Testing in a browser..."

929
test/saucelabs.js Normal file
View File

@@ -0,0 +1,929 @@
#!/usr/bin/env node
'use strict';
/** Environment shortcut. */
var env = process.env;
if (env.TRAVIS_SECURE_ENV_VARS == 'false') {
console.log('Skipping Sauce Labs jobs; secure environment variables are unavailable');
process.exit(0);
}
/** Load Node.js modules. */
var EventEmitter = require('events').EventEmitter,
http = require('http'),
path = require('path'),
url = require('url'),
util = require('util');
/** Load other modules. */
var _ = require('../lodash.src.js'),
chalk = require('chalk'),
ecstatic = require('ecstatic'),
request = require('request'),
SauceTunnel = require('sauce-tunnel');
/** Used for Sauce Labs credentials. */
var accessKey = env.SAUCE_ACCESS_KEY,
username = env.SAUCE_USERNAME;
/** Used as the default maximum number of times to retry a job and tunnel. */
var maxJobRetries = 3,
maxTunnelRetries = 3;
/** Used as the static file server middleware. */
var mount = ecstatic({
'cache': 'no-cache',
'root': process.cwd()
});
/** Used as the list of ports supported by Sauce Connect. */
var ports = [
80, 443, 888, 2000, 2001, 2020, 2109, 2222, 2310, 3000, 3001, 3030, 3210,
3333, 4000, 4001, 4040, 4321, 4502, 4503, 4567, 5000, 5001, 5050, 5555, 5432,
6000, 6001, 6060, 6666, 6543, 7000, 7070, 7774, 7777, 8000, 8001, 8003, 8031,
8080, 8081, 8765, 8777, 8888, 9000, 9001, 9080, 9090, 9876, 9877, 9999, 49221,
55001
];
/** Used by `logInline` to clear previously logged messages. */
var prevLine = '';
/** Method shortcut. */
var push = Array.prototype.push;
/** Used to detect error messages. */
var reError = /(?:\be|E)rror\b/;
/** Used to detect valid job ids. */
var reJobId = /^[a-z0-9]{32}$/;
/** Used to display the wait throbber. */
var throbberDelay = 500,
waitCount = -1;
/**
* Used as Sauce Labs config values.
* See the [Sauce Labs documentation](https://docs.saucelabs.com/reference/test-configuration/)
* for more details.
*/
var advisor = getOption('advisor', false),
build = getOption('build', (env.TRAVIS_COMMIT || '').slice(0, 10)),
commandTimeout = getOption('commandTimeout', 90),
compatMode = getOption('compatMode', null),
customData = Function('return {' + getOption('customData', '').replace(/^\{|}$/g, '') + '}')(),
deviceOrientation = getOption('deviceOrientation', 'portrait'),
framework = getOption('framework', 'qunit'),
idleTimeout = getOption('idleTimeout', 60),
jobName = getOption('name', 'unit tests'),
maxDuration = getOption('maxDuration', 120),
port = ports[Math.min(_.sortedIndex(ports, getOption('port', 9001)), ports.length - 1)],
publicAccess = getOption('public', true),
queueTimeout = getOption('queueTimeout', 240),
recordVideo = getOption('recordVideo', true),
recordScreenshots = getOption('recordScreenshots', false),
runner = getOption('runner', 'test/index.html').replace(/^\W+/, ''),
runnerUrl = getOption('runnerUrl', 'http://localhost:' + port + '/' + runner),
statusInterval = getOption('statusInterval', 5),
tags = getOption('tags', []),
throttled = getOption('throttled', 10),
tunneled = getOption('tunneled', true),
tunnelId = getOption('tunnelId', 'tunnel_' + (env.TRAVIS_JOB_ID || 0)),
tunnelTimeout = getOption('tunnelTimeout', 120),
videoUploadOnPass = getOption('videoUploadOnPass', false);
/** Used to convert Sauce Labs browser identifiers to their formal names. */
var browserNameMap = {
'googlechrome': 'Chrome',
'iehta': 'Internet Explorer',
'ipad': 'iPad',
'iphone': 'iPhone'
};
/** List of platforms to load the runner on. */
var platforms = [
['Linux', 'android', '5.0'],
['Linux', 'android', '4.4'],
['Linux', 'android', '4.0'],
['Windows 8.1', 'firefox', '37'],
['Windows 8.1', 'firefox', '36'],
['Windows 8.1', 'firefox', '20'],
['Windows 8.1', 'chrome', '42'],
['Windows 8.1', 'chrome', '41'],
['Windows 8.1', 'internet explorer', '11'],
['Windows 8', 'internet explorer', '10'],
['Windows 7', 'internet explorer', '9'],
['Windows 7', 'internet explorer', '8'],
['Windows XP', 'internet explorer', '7'],
['Windows XP', 'internet explorer', '6'],
['OS X 10.9', 'ipad', '8.1'],
['OS X 10.6', 'ipad', '4'],
['OS X 10.10', 'safari', '8'],
['OS X 10.9', 'safari', '7'],
['OS X 10.8', 'safari', '6'],
['OS X 10.6', 'safari', '5']
];
/** Used to tailor the `platforms` array. */
var isAMD = _.includes(tags, 'amd'),
isBackbone = _.includes(tags, 'backbone'),
isModern = _.includes(tags, 'modern');
// The platforms to test IE compatibility modes.
if (compatMode) {
platforms = [
['Windows 8.1', 'internet explorer', '11'],
['Windows 8', 'internet explorer', '10'],
['Windows 7', 'internet explorer', '9'],
['Windows 7', 'internet explorer', '8']
];
}
// The platforms for AMD tests.
if (isAMD) {
platforms = _.filter(platforms, function(platform) {
var browser = browserName(platform[1]),
version = +platform[2];
switch (browser) {
case 'Android': return version >= 4.4;
case 'Opera': return version >= 10;
}
return true;
});
}
// The platforms for Backbone tests.
if (isBackbone) {
platforms = _.filter(platforms, function(platform) {
var browser = browserName(platform[1]),
version = +platform[2];
switch (browser) {
case 'Firefox': return version >= 4;
case 'Internet Explorer': return version >= 7;
case 'iPad': return version >= 5;
case 'Opera': return version >= 12;
}
return true;
});
}
// The platforms for modern builds.
if (isModern) {
platforms = _.filter(platforms, function(platform) {
var browser = browserName(platform[1]),
version = +platform[2];
switch (browser) {
case 'Android': return version >= 4.1;
case 'Firefox': return version >= 10;
case 'Internet Explorer': return version >= 9;
case 'iPad': return version >= 6;
case 'Opera': return version >= 12;
case 'Safari': return version >= 6;
}
return true;
});
}
/** Used as the default `Job` options object. */
var jobOptions = {
'build': build,
'command-timeout': commandTimeout,
'custom-data': customData,
'device-orientation': deviceOrientation,
'framework': framework,
'idle-timeout': idleTimeout,
'max-duration': maxDuration,
'name': jobName,
'public': publicAccess,
'platforms': platforms,
'record-screenshots': recordScreenshots,
'record-video': recordVideo,
'sauce-advisor': advisor,
'tags': tags,
'url': runnerUrl,
'video-upload-on-pass': videoUploadOnPass
};
if (publicAccess === true) {
jobOptions['public'] = 'public';
}
if (tunneled) {
jobOptions['tunnel-identifier'] = tunnelId;
}
/*----------------------------------------------------------------------------*/
/**
* Resolves the formal browser name for a given Sauce Labs browser identifier.
*
* @private
* @param {string} identifier The browser identifier.
* @returns {string} Returns the formal browser name.
*/
function browserName(identifier) {
return browserNameMap[identifier] || capitalizeWords(identifier);
}
/**
* Capitalizes the first character of each word in `string`.
*
* @private
* @param {string} string The string to augment.
* @returns {string} Returns the augmented string.
*/
function capitalizeWords(string) {
return _.map(string.split(' '), _.capitalize).join(' ');
}
/**
* Gets the value for the given option name. If no value is available the
* `defaultValue` is returned.
*
* @private
* @param {string} name The name of the option.
* @param {*} defaultValue The default option value.
* @returns {*} Returns the option value.
*/
function getOption(name, defaultValue) {
var isArr = _.isArray(defaultValue);
return _.reduce(process.argv, function(result, value) {
if (isArr) {
value = optionToArray(name, value);
return _.isEmpty(value) ? result : value;
}
value = optionToValue(name, value);
return value == null ? result : value;
}, defaultValue);
}
/**
* Checks if `value` is a job ID.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a job ID, else `false`.
*/
function isJobId(value) {
return reJobId.test(value);
}
/**
* Writes an inline message to standard output.
*
* @private
* @param {string} [text=''] The text to log.
*/
function logInline(text) {
var blankLine = _.repeat(' ', _.size(prevLine));
prevLine = text = _.trunc(text, 40);
process.stdout.write(text + blankLine.slice(text.length) + '\r');
}
/**
* Writes the wait throbber to standard output.
*
* @private
*/
function logThrobber() {
logInline('Please wait' + _.repeat('.', (++waitCount % 3) + 1));
}
/**
* Converts a comma separated option value into an array.
*
* @private
* @param {string} name The name of the option to inspect.
* @param {string} string The options string.
* @returns {Array} Returns the new converted array.
*/
function optionToArray(name, string) {
return _.compact(_.invoke((optionToValue(name, string) || '').split(/, */), 'trim'));
}
/**
* Extracts the option value from an option string.
*
* @private
* @param {string} name The name of the option to inspect.
* @param {string} string The options string.
* @returns {string|undefined} Returns the option value, else `undefined`.
*/
function optionToValue(name, string) {
var result = string.match(RegExp('^' + name + '(?:=([\\s\\S]+))?$'));
if (result) {
result = _.result(result, 1);
result = result ? _.trim(result) : true;
}
if (result === 'false') {
return false;
}
return result || undefined;
}
/*----------------------------------------------------------------------------*/
/**
* The `Job#remove` and `Tunnel#stop` callback used by `Jobs#restart`
* and `Tunnel#restart` respectively.
*
* @private
*/
function onGenericRestart() {
this.restarting = false;
this.emit('restart');
this.start();
}
/**
* The `request.put` and `SauceTunnel#stop` callback used by `Jobs#stop`
* and `Tunnel#stop` respectively.
*
* @private
* @param {Object} [error] The error object.
*/
function onGenericStop(error) {
this.running = this.stopping = false;
this.emit('stop', error);
}
/**
* The `request.del` callback used by `Jobs#remove`.
*
* @private
*/
function onJobRemove(error, res, body) {
this.id = this.taskId = this.url = null;
this.removing = false;
this.emit('remove');
}
/**
* The `Job#remove` callback used by `Jobs#reset`.
*
* @private
*/
function onJobReset() {
this.attempts = 0;
this.failed = this.resetting = false;
this._pollerId = this.id = this.result = this.taskId = this.url = null;
this.emit('reset');
}
/**
* The `request.post` callback used by `Jobs#start`.
*
* @private
* @param {Object} [error] The error object.
* @param {Object} res The response data object.
* @param {Object} body The response body JSON object.
*/
function onJobStart(error, res, body) {
this.starting = false;
if (this.stopping) {
return;
}
var statusCode = _.result(res, 'statusCode'),
taskId = _.first(_.result(body, 'js tests'));
if (error || !taskId || statusCode != 200) {
if (this.attempts < this.retries) {
this.restart();
return;
}
var na = 'unavailable',
bodyStr = _.isObject(body) ? '\n' + JSON.stringify(body) : na,
statusStr = _.isFinite(statusCode) ? statusCode : na;
logInline();
console.error('Failed to start job; status: %s, body: %s', statusStr, bodyStr);
if (error) {
console.error(error);
}
this.failed = true;
this.emit('complete');
return;
}
this.running = true;
this.taskId = taskId;
this.timestamp = _.now();
this.emit('start');
this.status();
}
/**
* The `request.post` callback used by `Job#status`.
*
* @private
* @param {Object} [error] The error object.
* @param {Object} res The response data object.
* @param {Object} body The response body JSON object.
*/
function onJobStatus(error, res, body) {
this.checking = false;
if (!this.running || this.stopping) {
return;
}
var completed = _.result(body, 'completed', false),
data = _.first(_.result(body, 'js tests')),
elapsed = (_.now() - this.timestamp) / 1000,
jobId = _.result(data, 'job_id', null),
jobResult = _.result(data, 'result', null),
jobStatus = _.result(data, 'status', ''),
jobUrl = _.result(data, 'url', null),
expired = (elapsed >= queueTimeout && !_.includes(jobStatus, 'in progress')),
options = this.options,
platform = options.platforms[0];
if (_.isObject(jobResult)) {
var message = _.result(jobResult, 'message');
} else {
if (typeof jobResult == 'string') {
message = jobResult;
}
jobResult = null;
}
if (isJobId(jobId)) {
this.id = jobId;
this.result = jobResult;
this.url = jobUrl;
} else {
completed = false;
}
this.emit('status', jobStatus);
if (!completed && !expired) {
this._pollerId = _.delay(_.bind(this.status, this), this.statusInterval * 1000);
return;
}
var description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + capitalizeWords(platform[0]),
errored = !jobResult || !jobResult.passed || reError.test(message) || reError.test(jobStatus),
failures = _.result(jobResult, 'failed'),
label = options.name + ':',
tunnel = this.tunnel;
if (errored || failures) {
if (errored && this.attempts < this.retries) {
this.restart();
return;
}
var details = 'See ' + jobUrl + ' for details.';
this.failed = true;
logInline();
if (failures) {
console.error(label + ' %s ' + chalk.red('failed') + ' %d test' + (failures > 1 ? 's' : '') + '. %s', description, failures, details);
}
else if (tunnel.attempts < tunnel.retries) {
tunnel.restart();
return;
}
else {
if (typeof message == 'undefined') {
message = 'Results are unavailable. ' + details;
}
console.error(label, description, chalk.red('failed') + ';', message);
}
}
else {
logInline();
console.log(label, description, chalk.green('passed'));
}
this.running = false;
this.emit('complete');
}
/**
* The `SauceTunnel#start` callback used by `Tunnel#start`.
*
* @private
* @param {boolean} success The connection success indicator.
*/
function onTunnelStart(success) {
this.starting = false;
if (this._timeoutId) {
clearTimeout(this._timeoutId);
this._timeoutId = null;
}
if (!success) {
if (this.attempts < this.retries) {
this.restart();
return;
}
logInline();
console.error('Failed to open Sauce Connect tunnel');
process.exit(2);
}
logInline();
console.log('Sauce Connect tunnel opened');
var jobs = this.jobs;
push.apply(jobs.queue, jobs.all);
this.running = true;
this.emit('start');
console.log('Starting jobs...');
this.dequeue();
}
/*----------------------------------------------------------------------------*/
/**
* The Job constructor.
*
* @private
* @param {Object} [properties] The properties to initialize a job with.
*/
function Job(properties) {
EventEmitter.call(this);
this.options = {};
_.merge(this, properties);
_.defaults(this.options, _.cloneDeep(jobOptions));
this.attempts = 0;
this.checking = this.failed = this.removing = this.resetting = this.restarting = this.running = this.starting = this.stopping = false;
this._pollerId = this.id = this.result = this.taskId = this.url = null;
}
util.inherits(Job, EventEmitter);
/**
* Removes the job.
*
* @memberOf Job
* @param {Function} callback The function called once the job is removed.
* @param {Object} Returns the job instance.
*/
Job.prototype.remove = function(callback) {
this.once('remove', _.callback(callback));
if (this.removing) {
return this;
}
this.removing = true;
return this.stop(function() {
var onRemove = _.bind(onJobRemove, this);
if (!this.id) {
_.defer(onRemove);
return;
}
request.del(_.template('https://saucelabs.com/rest/v1/${user}/jobs/${id}')(this), {
'auth': { 'user': this.user, 'pass': this.pass }
}, onRemove);
});
};
/**
* Resets the job.
*
* @memberOf Job
* @param {Function} callback The function called once the job is reset.
* @param {Object} Returns the job instance.
*/
Job.prototype.reset = function(callback) {
this.once('reset', _.callback(callback));
if (this.resetting) {
return this;
}
this.resetting = true;
return this.remove(onJobReset);
};
/**
* Restarts the job.
*
* @memberOf Job
* @param {Function} callback The function called once the job is restarted.
* @param {Object} Returns the job instance.
*/
Job.prototype.restart = function(callback) {
this.once('restart', _.callback(callback));
if (this.restarting) {
return this;
}
this.restarting = true;
var options = this.options,
platform = options.platforms[0],
description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + capitalizeWords(platform[0]),
label = options.name + ':';
logInline();
console.log('%s %s restart %d of %d', label, description, ++this.attempts, this.retries);
return this.remove(onGenericRestart);
};
/**
* Starts the job.
*
* @memberOf Job
* @param {Function} callback The function called once the job is started.
* @param {Object} Returns the job instance.
*/
Job.prototype.start = function(callback) {
this.once('start', _.callback(callback));
if (this.starting || this.running) {
return this;
}
this.starting = true;
request.post(_.template('https://saucelabs.com/rest/v1/${user}/js-tests')(this), {
'auth': { 'user': this.user, 'pass': this.pass },
'json': this.options
}, _.bind(onJobStart, this));
return this;
};
/**
* Checks the status of a job.
*
* @memberOf Job
* @param {Function} callback The function called once the status is resolved.
* @param {Object} Returns the job instance.
*/
Job.prototype.status = function(callback) {
this.once('status', _.callback(callback));
if (this.checking || this.removing || this.resetting || this.restarting || this.starting || this.stopping) {
return this;
}
this._pollerId = null;
this.checking = true;
request.post(_.template('https://saucelabs.com/rest/v1/${user}/js-tests/status')(this), {
'auth': { 'user': this.user, 'pass': this.pass },
'json': { 'js tests': [this.taskId] }
}, _.bind(onJobStatus, this));
return this;
};
/**
* Stops the job.
*
* @memberOf Job
* @param {Function} callback The function called once the job is stopped.
* @param {Object} Returns the job instance.
*/
Job.prototype.stop = function(callback) {
this.once('stop', _.callback(callback));
if (this.stopping) {
return this;
}
this.stopping = true;
if (this._pollerId) {
clearTimeout(this._pollerId);
this._pollerId = null;
this.checking = false;
}
var onStop = _.bind(onGenericStop, this);
if (!this.running || !this.id) {
_.defer(onStop);
return this;
}
request.put(_.template('https://saucelabs.com/rest/v1/${user}/jobs/${id}/stop')(this), {
'auth': { 'user': this.user, 'pass': this.pass }
}, onStop);
return this;
};
/*----------------------------------------------------------------------------*/
/**
* The Tunnel constructor.
*
* @private
* @param {Object} [properties] The properties to initialize the tunnel with.
*/
function Tunnel(properties) {
EventEmitter.call(this);
_.merge(this, properties);
var active = [],
queue = [];
var all = _.map(this.platforms, function(platform) {
return new Job(_.merge({
'user': this.user,
'pass': this.pass,
'tunnel': this,
'options': { 'platforms': [platform] }
}, this.job));
}, this);
var completed = 0,
restarted = [],
success = true,
total = all.length,
tunnel = this;
_.invoke(all, 'on', 'complete', function() {
_.pull(active, this);
if (success) {
success = !this.failed;
}
if (++completed == total) {
tunnel.stop(_.partial(tunnel.emit, 'complete', success));
return;
}
tunnel.dequeue();
});
_.invoke(all, 'on', 'restart', function() {
if (!_.includes(restarted, this)) {
restarted.push(this);
}
// Restart tunnel if all active jobs have restarted.
var threshold = Math.min(all.length, _.isFinite(throttled) ? throttled : 3);
if (tunnel.attempts < tunnel.retries &&
active.length >= threshold && _.isEmpty(_.difference(active, restarted))) {
tunnel.restart();
}
});
this.on('restart', function() {
completed = 0;
success = true;
restarted.length = 0;
});
this._timeoutId = null;
this.attempts = 0;
this.restarting = this.running = this.starting = this.stopping = false;
this.jobs = { 'active': active, 'all': all, 'queue': queue };
this.connection = new SauceTunnel(this.user, this.pass, this.id, this.tunneled, ['-P', '0']);
}
util.inherits(Tunnel, EventEmitter);
/**
* Restarts the tunnel.
*
* @memberOf Tunnel
* @param {Function} callback The function called once the tunnel is restarted.
*/
Tunnel.prototype.restart = function(callback) {
this.once('restart', _.callback(callback));
if (this.restarting) {
return this;
}
this.restarting = true;
logInline();
console.log('Tunnel %s: restart %d of %d', this.id, ++this.attempts, this.retries);
var jobs = this.jobs,
active = jobs.active,
all = jobs.all;
var reset = _.after(all.length, _.bind(this.stop, this, onGenericRestart)),
stop = _.after(active.length, _.partial(_.invoke, all, 'reset', reset));
if (_.isEmpty(active)) {
_.defer(stop);
}
if (_.isEmpty(all)) {
_.defer(reset);
}
_.invoke(active, 'stop', function() {
_.pull(active, this);
stop();
});
if (this._timeoutId) {
clearTimeout(this._timeoutId);
this._timeoutId = null;
}
return this;
};
/**
* Starts the tunnel.
*
* @memberOf Tunnel
* @param {Function} callback The function called once the tunnel is started.
* @param {Object} Returns the tunnel instance.
*/
Tunnel.prototype.start = function(callback) {
this.once('start', _.callback(callback));
if (this.starting || this.running) {
return this;
}
this.starting = true;
logInline();
console.log('Opening Sauce Connect tunnel...');
var onStart = _.bind(onTunnelStart, this);
if (this.timeout) {
this._timeoutId = _.delay(onStart, this.timeout * 1000, false);
}
this.connection.start(onStart);
return this;
};
/**
* Removes jobs from the queue and starts them.
*
* @memberOf Tunnel
* @param {Object} Returns the tunnel instance.
*/
Tunnel.prototype.dequeue = function() {
var jobs = this.jobs,
active = jobs.active,
queue = jobs.queue,
throttled = this.throttled;
while (queue.length && (active.length < throttled)) {
active.push(queue.shift().start());
}
return this;
};
/**
* Stops the tunnel.
*
* @memberOf Tunnel
* @param {Function} callback The function called once the tunnel is stopped.
* @param {Object} Returns the tunnel instance.
*/
Tunnel.prototype.stop = function(callback) {
this.once('stop', _.callback(callback));
if (this.stopping) {
return this;
}
this.stopping = true;
logInline();
console.log('Shutting down Sauce Connect tunnel...');
var jobs = this.jobs,
active = jobs.active;
var stop = _.after(active.length, _.bind(function() {
var onStop = _.bind(onGenericStop, this);
if (this.running) {
this.connection.stop(onStop);
} else {
onStop();
}
}, this));
jobs.queue.length = 0;
if (_.isEmpty(active)) {
_.defer(stop);
}
_.invoke(active, 'stop', function() {
_.pull(active, this);
stop();
});
if (this._timeoutId) {
clearTimeout(this._timeoutId);
this._timeoutId = null;
}
return this;
};
/*----------------------------------------------------------------------------*/
// Cleanup any inline logs when exited via `ctrl+c`.
process.on('SIGINT', function() {
logInline();
process.exit();
});
// Create a web server for the current working directory.
http.createServer(function(req, res) {
// See http://msdn.microsoft.com/en-us/library/ff955275(v=vs.85).aspx.
if (compatMode && path.extname(url.parse(req.url).pathname) == '.html') {
res.setHeader('X-UA-Compatible', 'IE=' + compatMode);
}
mount(req, res);
}).listen(port);
// Setup Sauce Connect so we can use this server from Sauce Labs.
var tunnel = new Tunnel({
'user': username,
'pass': accessKey,
'id': tunnelId,
'job': { 'retries': maxJobRetries, 'statusInterval': statusInterval },
'platforms': platforms,
'retries': maxTunnelRetries,
'throttled': throttled,
'tunneled': tunneled,
'timeout': tunnelTimeout
});
tunnel.on('complete', function(success) {
process.exit(success ? 0 : 1);
});
tunnel.start();
setInterval(logThrobber, throbberDelay);

View File

@@ -1,3 +0,0 @@
<ul>
<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>
</ul>

View File

@@ -1 +0,0 @@
<% print("Hello " + epithet); %>.

View File

@@ -1 +0,0 @@
Hello ${ name }!

View File

@@ -1 +0,0 @@
Hello {{ name }}!

File diff suppressed because it is too large Load Diff

View File

@@ -1,108 +0,0 @@
;(function(window) {
'use strict';
/** `QUnit.addEvent` shortcut */
var addEvent = QUnit.addEvent;
/** The Lo-Dash build to load */
var build = (/build=([^&]+)/.exec(location.search) || [])[1];
/** A flag to determine if RequireJS should be loaded */
var norequire = /[?&]norequire=true(?:&|$)/.test(location.search);
/** The `ui` object */
var ui = {};
/*--------------------------------------------------------------------------*/
// expose Lo-Dash build file path
ui.buildPath = (function() {
switch (build) {
case 'lodash-prod': return 'dist/lodash.compat.min.js';
case 'lodash-underscore': return 'dist/lodash.underscore.min.js';
case 'lodash-modern': return 'dist/lodash.min.js';
case 'lodash-modern-debug': return 'dist/lodash.js';
case 'lodash-custom': return 'lodash.custom.min.js';
case 'lodash-custom-debug': return 'lodash.custom.js';
}
return 'lodash.js';
}());
// assign `QUnit.urlParams` properties
QUnit.extend(QUnit.urlParams, {
'build': build,
'norequire': norequire
});
// initialize controls
addEvent(window, 'load', function() {
function eventHandler(event) {
var search = location.search.replace(/^\?|&?(?:build|norequire)=[^&]*&?/g, '');
if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
location.href =
location.href.split('?')[0] + '?' +
(search ? search + '&' : '') +
'build=' + buildList[buildList.selectedIndex].value +
(checkbox.checked ? '&norequire=true' : '');
}
function init() {
var toolbar = document.getElementById('qunit-testrunner-toolbar');
if (toolbar) {
toolbar.appendChild(span1);
toolbar.appendChild(span2);
buildList.selectedIndex = (function() {
switch (build) {
case 'lodash-prod': return 1;
case 'lodash-underscore': return 2;
case 'lodash-modern': return 3;
case 'lodash-modern-debug': return 4;
case 'lodash-custom': return 5;
case 'lodash-custom-debug': return 6;
}
return 0;
}());
checkbox.checked = norequire;
addEvent(checkbox, 'click', eventHandler);
addEvent(buildList, 'change', eventHandler);
}
else {
setTimeout(init, 15);
}
}
var span1 = document.createElement('span');
span1.innerHTML =
'<input id="qunit-norequire" type="checkbox">' +
'<label for="qunit-norequire">No RequireJS</label>';
var span2 = document.createElement('span');
span2.style.cssText = 'float:right';
span2.innerHTML =
'<label for="qunit-build">Build: </label>' +
'<select id="qunit-build">' +
'<option value="lodash-dev">Developement</option>' +
'<option value="lodash-prod">Production</option>' +
'<option value="lodash-underscore">Underscore</option>' +
'<option value="lodash-modern">Modern</option>' +
'<option value="lodash-modern-debug">Modern (debug)</option>' +
'<option value="lodash-custom">Custom</option>' +
'<option value="lodash-custom-debug">Custom (debug)</option>' +
'</select>';
var checkbox = span1.firstChild,
buildList = span2.lastChild;
init();
});
// expose `ui`
window.ui = ui;
}(this));

18090
test/test.js

File diff suppressed because it is too large Load Diff

View File

@@ -3,100 +3,240 @@
<head>
<meta charset="utf-8">
<title>Underscore Test Suite</title>
<link rel="stylesheet" href="../vendor/qunit/qunit/qunit.css">
<style>
iframe {
display: none;
}
</style>
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture">
<div id="map-test">
<div id="id1"></div>
<div id="id2"></div>
</div>
<img id="chart_image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">
</div>
<script src="../vendor/jquery/jquery.js"></script>
<script src="../vendor/platform.js/platform.js"></script>
<script src="../vendor/qunit/qunit/qunit.js"></script>
<script src="test-ui.js"></script>
<script>
document.write('<script src="../' + ui.buildPath + '"><\/script>');
// Avoid reporting tests to Sauce Labs when script errors occur.
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
QUnit.config.done.length = 0;
}
global_test_results = { 'message': message };
};
}
</script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
<script src="../node_modules/jquery/dist/jquery.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="./asset/test-ui.js"></script>
<script>
QUnit.config.asyncRetries = 10;
QUnit.config.hidepassed = true;
// Excuse tests we intentionally fail or those with problems.
QUnit.config.excused = {
'Arrays': {
'drop': [
'alias for rest'
],
'first': [
'can pass an index to first',
'[1,2]',
'0'
],
'flatten': [
'Flattens empty arrays',
'can flatten nested arrays',
'can shallowly flatten nested arrays',
'works on an arguments object',
'can shallowly flatten arrays containing only other arrays'
],
'initial': [
'initial can take an index',
'initial can take a large index',
'initial works on arguments object'
],
'intersection': [
'can perform an OO-style intersection'
],
'last': [
'can pass an index to last',
'0'
],
'lastIndexOf': [
'[0,-1,-1]'
],
'rest': [
'working rest(0)',
'rest can take an index',
'works on arguments object'
],
'take': [
'alias for first'
]
},
'Chaining': {
'pop': true,
'shift': true,
'splice': true,
'reverse/concat/unshift/pop/map': [
'can chain together array functions.'
]
},
'Collections': {
'filter': [
'OO-filter'
],
'invoke': [
'handles null & undefined'
],
'map': [
'OO-style doubled numbers'
],
'Resistant to collection length and properties changing while iterating': [
'Died on test #50'
]
},
'Functions': {
'bind': [
'Died on test #2'
],
'bindAll': [
'throws an error for bindAll with no functions named'
],
'memoize': [
'{"bar":"BAR","foo":"FOO"}',
'Died on test #8'
],
'throttle repeatedly with results': true,
'more throttle does not trigger leading call when leading is set to false': true,
'throttle does not trigger trailing call when trailing is set to false': true,
'debounce asap': true
},
'Objects': {
'#1929 Typed Array constructors are functions': true,
'allKeys': true,
'extendOwn': true,
'mapObject': true,
'matcher': true,
'matcher ': true,
'extend': [
'extend copies all properties from source'
],
'isEqual': [
'`0` is not equal to `-0`',
'Commutative equality is implemented for `0` and `-0`',
'`new Number(0)` and `-0` are not equal',
'Commutative equality is implemented for `new Number(0)` and `-0`'
],
'isFinite': [
'Numeric strings are numbers',
'Number instances can be finite'
],
'isMatch': [
'inherited and own properties are checked on the test object',
'doesnt falsey match constructor on undefined/null'
],
'keys': [
'is not fooled by sparse arrays; see issue #95',
'[]'
],
'matches': [
'inherited and own properties are checked on the test object',
'doesnt fasley match constructor on undefined/null'
]
},
'Utility': {
'now': [
'Produces the correct time in milliseconds'
],
'times': [
'works as a wrapper'
]
}
};
// Only excuse in Sauce Labs (buggy Safari and timers).
if (!ui.isSauceLabs) {
delete QUnit.config.excused.Functions['throttle repeatedly with results'];
delete QUnit.config.excused.Functions['more throttle does not trigger leading call when leading is set to false'];
delete QUnit.config.excused.Functions['throttle does not trigger trailing call when trailing is set to false'];
delete QUnit.config.excused.Functions['debounce asap'];
delete QUnit.config.excused.Utility.now;
}
// Load test scripts.
document.write(ui.urlParams.loader != 'none'
? '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
: ([
'<script src="' + ui.buildPath + '"><\/script>',
'<script src="../vendor/underscore/test/collections.js"><\/script>',
'<script src="../vendor/underscore/test/arrays.js"><\/script>',
'<script src="../vendor/underscore/test/functions.js"><\/script>',
'<script src="../vendor/underscore/test/objects.js"><\/script>',
'<script src="../vendor/underscore/test/cross-document.js"><\/script>',
'<script src="../vendor/underscore/test/utility.js"><\/script>',
'<script src="../vendor/underscore/test/chaining.js"><\/script>'
].join('\n'))
);
</script>
<script>
(function() {
var arrayProto = Array.prototype,
concat = arrayProto.concat,
pop = arrayProto.pop,
push = arrayProto.push,
slice = arrayProto.slice;
if (_.chain) {
if (window.curl) {
curl.config({ 'apiName': 'require' });
}
if (!window.require) {
return;
}
_.mixin = function(object) {
_.forEach(_.functions(object), function(methodName) {
var func = _[methodName] = object[methodName];
_.prototype[methodName] = function() {
var args = [this.__wrapped__];
push.apply(args, arguments);
var reBasename = /[\w.-]+$/,
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
modulePath = ui.buildPath.replace(/\.js$/, ''),
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
moduleId = /\bunderscore\b/i.test(ui.buildPath) ? 'underscore' : 'lodash',
moduleMain = modulePath.match(reBasename)[0],
uid = +new Date;
var result = func.apply(_, args);
if (this.__chain__) {
result = new _(result);
result.__chain__ = true;
function getConfig() {
var result = {
'baseUrl': './',
'urlArgs': 't=' + uid++,
'waitSeconds': 0,
'paths': {},
'packages': [{
'name': 'test',
'location': '../vendor/underscore/test',
'config': {
// Work around no global being exported.
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
return result;
};
});
};
}]
};
_.mixin(_);
_.mixin({
'findWhere': _.find
});
_.chain = function(value) {
value = new _(value);
value.__chain__ = true;
return value;
};
_.prototype.chain = function() {
this.__chain__ = true;
return this;
};
_.prototype.concat = function() {
var result = concat.apply(this.__wrapped__, arguments);
if (this.__chain__) {
result = new _(result);
result.__chain__ = true;
if (ui.isModularize) {
result.packages.push({
'name': moduleId,
'location': locationPath,
'main': moduleMain
});
} else {
result.paths[moduleId] = modulePath;
}
return result;
};
}
_.prototype.pop = function() {
pop.apply(this.__wrapped__, arguments);
return this;
};
QUnit.config.autostart = false;
require(getConfig(), [moduleId], function(lodash) {
if (ui.isModularize) {
window._ = lodash;
}
require(getConfig(), [
'test/collections',
'test/arrays',
'test/functions',
'test/objects',
'test/cross-document',
'test/utility',
'test/chaining'
], function() {
QUnit.start();
});
});
}());
</script>
<script src="../vendor/underscore/test/collections.js"></script>
<script src="../vendor/underscore/test/arrays.js"></script>
<script src="../vendor/underscore/test/functions.js"></script>
<script src="../vendor/underscore/test/objects.js"></script>
<script src="../vendor/underscore/test/utility.js"></script>
<script src="../vendor/underscore/test/chaining.js"></script>
<script type="text/html" id="template">
<%
// a comment
if (data) { data += 12345; }; %>
<li><%= data %></li>
</script>
</body>
</html>

View File

@@ -1,4 +1,4 @@
Copyright (c) 2010-2013 Jeremy Ashkenas, DocumentCloud
Copyright (c) 2010-2015 Jeremy Ashkenas, DocumentCloud
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

View File

@@ -1,26 +0,0 @@
____ __ __
/\ _`\ /\ \ /\ \ __
\ \ \ \ \ __ ___\ \ \/'\\ \ \____ ___ ___ __ /\_\ ____
\ \ _ <' /'__`\ /'___\ \ , < \ \ '__`\ / __`\ /' _ `\ /'__`\ \/\ \ /',__\
\ \ \ \ \/\ \ \.\_/\ \__/\ \ \\`\\ \ \ \ \/\ \ \ \/\ \/\ \/\ __/ __ \ \ \/\__, `\
\ \____/\ \__/.\_\ \____\\ \_\ \_\ \_,__/\ \____/\ \_\ \_\ \____\/\_\_\ \ \/\____/
\/___/ \/__/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/_/\/_/\/____/\/_/\ \_\ \/___/
\ \____/
\/___/
(_'_______________________________________________________________________________'_)
(_.———————————————————————————————————————————————————————————————————————————————._)
Backbone supplies structure to JavaScript-heavy applications by providing models key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface.
For Docs, License, Tests, pre-packed downloads, and everything else, really, see:
http://backbonejs.org
To suggest a feature, report a bug, or general discussion:
http://github.com/documentcloud/backbone/issues/
All contributors are listed here:
http://github.com/documentcloud/backbone/contributors
Special thanks to Robert Kieffer for the original philosophy behind Backbone.
http://github.com/broofa

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,10 @@
$(document).ready(function() {
(function() {
var a, b, c, d, e, col, otherCol;
module("Backbone.Collection", _.extend(new Environment, {
module("Backbone.Collection", {
setup: function() {
Environment.prototype.setup.apply(this, arguments);
a = new Backbone.Model({id: 3, label: 'a'});
b = new Backbone.Model({id: 2, label: 'b'});
c = new Backbone.Model({id: 1, label: 'c'});
@@ -16,25 +14,22 @@ $(document).ready(function() {
otherCol = new Backbone.Collection();
}
}));
});
test("new and sort", 9, function() {
test("new and sort", 6, function() {
var counter = 0;
col.on('sort', function(){ counter++; });
equal(col.first(), a, "a should be first");
equal(col.last(), d, "d should be last");
deepEqual(col.pluck('label'), ['a', 'b', 'c', 'd']);
col.comparator = function(a, b) {
return a.id > b.id ? -1 : 1;
};
col.sort();
equal(counter, 1);
equal(col.first(), a, "a should be first");
equal(col.last(), d, "d should be last");
deepEqual(col.pluck('label'), ['a', 'b', 'c', 'd']);
col.comparator = function(model) { return model.id; };
col.sort();
equal(counter, 2);
equal(col.first(), d, "d should be first");
equal(col.last(), a, "a should be last");
deepEqual(col.pluck('label'), ['d', 'c', 'b', 'a']);
equal(col.length, 4);
});
@@ -62,6 +57,20 @@ $(document).ready(function() {
strictEqual(collection.last().get('a'), 4);
});
test("clone preserves model and comparator", 3, function() {
var Model = Backbone.Model.extend();
var comparator = function(model){ return model.id; };
var collection = new Backbone.Collection([{id: 1}], {
model: Model,
comparator: comparator
}).clone();
collection.add({id: 2});
ok(collection.at(0) instanceof Model);
ok(collection.at(1) instanceof Model);
strictEqual(collection.comparator, comparator);
});
test("get", 6, function() {
equal(col.get(0), d);
equal(col.get(d.clone()), d);
@@ -72,10 +81,9 @@ $(document).ready(function() {
});
test("get with non-default ids", 5, function() {
var col = new Backbone.Collection();
var MongoModel = Backbone.Model.extend({idAttribute: '_id'});
var model = new MongoModel({_id: 100});
col.add(model);
var col = new Backbone.Collection([model], {model: MongoModel});
equal(col.get(100), model);
equal(col.get(model.cid), model);
equal(col.get(model), model);
@@ -87,7 +95,12 @@ $(document).ready(function() {
equal(col2.get(model.clone()), col2.first());
});
test("update index when id changes", 3, function() {
test('get with "undefined" id', function() {
var collection = new Backbone.Collection([{id: 1}, {id: 'undefined'}]);
equal(collection.get(1).id, 1);
});
test("update index when id changes", 4, function() {
var col = new Backbone.Collection();
col.add([
{id : 0, name : 'one'},
@@ -95,20 +108,22 @@ $(document).ready(function() {
]);
var one = col.get(0);
equal(one.get('name'), 'one');
one.set({id : 101});
col.on('change:name', function (model) { ok(this.get(model)); });
one.set({name: 'dalmatians', id : 101});
equal(col.get(0), null);
equal(col.get(101).get('name'), 'one');
equal(col.get(101).get('name'), 'dalmatians');
});
test("at", 1, function() {
test("at", 2, function() {
equal(col.at(2), c);
equal(col.at(-2), c);
});
test("pluck", 1, function() {
equal(col.pluck('label').join(' '), 'a b c d');
});
test("add", 10, function() {
test("add", 14, function() {
var added, opts, secondAdded;
added = opts = secondAdded = null;
e = new Backbone.Model({id: 10, label : 'e'});
@@ -137,6 +152,18 @@ $(document).ready(function() {
equal(atCol.length, 4);
equal(atCol.at(1), e);
equal(atCol.last(), h);
var coll = new Backbone.Collection(new Array(2));
var addCount = 0;
coll.on('add', function(){
addCount += 1;
});
coll.add([undefined, f, g]);
equal(coll.length, 5);
equal(addCount, 3);
coll.add(new Array(4));
equal(coll.length, 9);
equal(addCount, 7);
});
test("add multiple models", 6, function() {
@@ -226,13 +253,13 @@ $(document).ready(function() {
});
test("add with parse and merge", function() {
var Model = Backbone.Model.extend({
parse: function (data) {
return data.model;
}
});
var collection = new Backbone.Collection();
collection.model = Model;
collection.parse = function(attrs) {
return _.map(attrs, function(model) {
if (model.model) return model.model;
return model;
});
};
collection.add({id: 1});
collection.add({model: {id: 1, name: 'Alf'}}, {parse: true, merge: true});
equal(collection.first().get('name'), 'Alf');
@@ -271,9 +298,10 @@ $(document).ready(function() {
deepEqual(col.pluck('id'), [1, 2, 3]);
});
test("remove", 5, function() {
test("remove", 7, function() {
var removed = null;
var otherRemoved = null;
var result = null;
col.on('remove', function(model, col, options) {
removed = model.get('label');
equal(options.index, 3);
@@ -281,13 +309,50 @@ $(document).ready(function() {
otherCol.on('remove', function(model, col, options) {
otherRemoved = true;
});
col.remove(d);
result = col.remove(d);
equal(removed, 'd');
strictEqual(result, d);
//if we try to remove d again, it's not going to actually get removed
result = col.remove(d);
strictEqual(result, undefined);
equal(col.length, 3);
equal(col.first(), a);
equal(otherRemoved, null);
});
test("add and remove return values", 13, function() {
var Even = Backbone.Model.extend({
validate: function(attrs) {
if (attrs.id % 2 !== 0) return "odd";
}
});
var col = new Backbone.Collection;
col.model = Even;
var list = col.add([{id: 2}, {id: 4}], {validate: true});
equal(list.length, 2);
ok(list[0] instanceof Backbone.Model);
equal(list[1], col.last());
equal(list[1].get('id'), 4);
list = col.add([{id: 3}, {id: 6}], {validate: true});
equal(col.length, 3);
equal(list[0], false);
equal(list[1].get('id'), 6);
var result = col.add({id: 6});
equal(result.cid, list[1].cid);
result = col.remove({id: 6});
equal(col.length, 2);
equal(result.id, 6);
list = col.remove([{id: 2}, {id: 8}]);
equal(col.length, 1);
equal(list[0].get('id'), 2);
equal(list[1], null);
});
test("shift and pop", 2, function() {
var col = new Backbone.Collection([{a: 'a'}, {b: 'b'}, {c: 'c'}]);
equal(col.shift().get('a'), 'a');
@@ -415,6 +480,21 @@ $(document).ready(function() {
collection.fetch();
});
test("#3283 - fetch with an error response calls error with context", 1, function () {
var collection = new Backbone.Collection();
var obj = {};
var options = {
context: obj,
error: function() {
equal(this, obj);
}
};
collection.sync = function (method, model, options) {
options.error.call(options.context);
};
collection.fetch(options);
});
test("ensure fetch only parses once", 1, function() {
var collection = new Backbone.Collection;
var counter = 0;
@@ -438,7 +518,7 @@ $(document).ready(function() {
equal(model.collection, collection);
});
test("create with validate:true enforces validation", 2, function() {
test("create with validate:true enforces validation", 3, function() {
var ValidatingModel = Backbone.Model.extend({
validate: function(attrs) {
return "fail";
@@ -448,12 +528,37 @@ $(document).ready(function() {
model: ValidatingModel
});
var col = new ValidatingCollection();
col.on('invalid', function (collection, attrs, options) {
col.on('invalid', function (collection, error, options) {
equal(error, "fail");
equal(options.validationError, 'fail');
});
equal(col.create({"foo":"bar"}, {validate:true}), false);
});
test("create will pass extra options to success callback", 1, function () {
var Model = Backbone.Model.extend({
sync: function (method, model, options) {
_.extend(options, {specialSync: true});
return Backbone.Model.prototype.sync.call(this, method, model, options);
}
});
var Collection = Backbone.Collection.extend({
model: Model,
url: '/test'
});
var collection = new Collection;
var success = function (model, response, options) {
ok(options.specialSync, "Options were passed correctly to callback");
};
collection.create({}, {success: success});
this.ajaxSettings.success();
});
test("a failing create returns model with errors", function() {
var ValidatingModel = Backbone.Model.extend({
validate: function(attrs) {
@@ -502,7 +607,7 @@ $(document).ready(function() {
equal(coll.findWhere({a: 4}), void 0);
});
test("Underscore methods", 13, function() {
test("Underscore methods", 16, function() {
equal(col.map(function(model){ return model.get('label'); }).join(' '), 'a b c d');
equal(col.any(function(model){ return model.id === 100; }), false);
equal(col.any(function(model){ return model.id === 0; }), true);
@@ -520,21 +625,13 @@ $(document).ready(function() {
.map(function(o){ return o.id * 2; })
.value(),
[4, 0]);
deepEqual(col.difference([c, d]), [a, b]);
ok(col.include(col.sample()));
var first = col.first();
ok(col.indexBy('id')[first.id] === first);
});
test("sortedIndex", function () {
var model = new Backbone.Model({key: 2});
var collection = new (Backbone.Collection.extend({
comparator: 'key'
}))([model, {key: 1}]);
equal(collection.sortedIndex(model), 1);
equal(collection.sortedIndex(model, 'key'), 1);
equal(collection.sortedIndex(model, function (model) {
return model.get('key');
}), 1);
});
test("reset", 12, function() {
test("reset", 16, function() {
var resetCount = 0;
var models = col.models;
col.on('reset', function() { resetCount += 1; });
@@ -554,6 +651,15 @@ $(document).ready(function() {
col.reset();
equal(col.length, 0);
equal(resetCount, 4);
var f = new Backbone.Model({id: 20, label : 'f'});
col.reset([undefined, f]);
equal(col.length, 2);
equal(resetCount, 5);
col.reset(new Array(4));
equal(col.length, 4);
equal(resetCount, 6);
});
test ("reset with different values", function(){
@@ -583,6 +689,16 @@ $(document).ready(function() {
});
});
test("reset does not alter options by reference", 2, function() {
var col = new Backbone.Collection([{id:1}]);
var origOpts = {};
col.on("reset", function(col, opts){
equal(origOpts.previousModels, undefined);
equal(opts.previousModels[0].id, 1);
});
col.reset([], origOpts);
});
test("trigger custom events on models", 1, function() {
var fired = null;
a.on("custom", function() { fired = true; });
@@ -621,22 +737,22 @@ $(document).ready(function() {
equal(col.length, 0);
});
test("#861, adding models to a collection which do not pass validation, with validate:true", function() {
var Model = Backbone.Model.extend({
validate: function(attrs) {
if (attrs.id == 3) return "id can't be 3";
}
});
test("#861, adding models to a collection which do not pass validation, with validate:true", 2, function() {
var Model = Backbone.Model.extend({
validate: function(attrs) {
if (attrs.id == 3) return "id can't be 3";
}
});
var Collection = Backbone.Collection.extend({
model: Model
});
var Collection = Backbone.Collection.extend({
model: Model
});
var collection = new Collection;
collection.on("error", function() { ok(true); });
var collection = new Collection;
collection.on("invalid", function() { ok(true); });
collection.add([{id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}, {id: 6}], {validate:true});
deepEqual(collection.pluck('id'), [1, 2, 4, 5, 6]);
collection.add([{id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}, {id: 6}], {validate:true});
deepEqual(collection.pluck("id"), [1, 2, 4, 5, 6]);
});
test("Invalid models are discarded with validate:true.", 5, function() {
@@ -705,12 +821,13 @@ $(document).ready(function() {
var m = new Backbone.Model({x:1});
var col = new Backbone.Collection();
var opts = {
success: function(collection, resp, options){
ok(options);
opts: true,
success: function(collection, resp, options) {
ok(options.opts);
}
};
col.sync = m.sync = function( method, collection, options ){
options.success(collection, [], options);
options.success({});
};
col.fetch(opts);
col.create(m, opts);
@@ -740,6 +857,24 @@ $(document).ready(function() {
collection.off();
});
test("#3283 - fetch, create calls success with context", 2, function() {
var collection = new Backbone.Collection;
collection.url = '/test';
Backbone.ajax = function(settings) {
settings.success.call(settings.context);
};
var obj = {};
var options = {
context: obj,
success: function() {
equal(this, obj);
}
};
collection.fetch(options);
collection.create({id: 1}, options);
});
test("#1447 - create with wait adds model.", 1, function() {
var collection = new Backbone.Collection;
var model = new Backbone.Model;
@@ -963,17 +1098,33 @@ $(document).ready(function() {
equal(col.first().get('key'), 'other');
col.set({id: 1, other: 'value'});
equal(col.first().get('key'), 'value');
equal(col.first().get('key'), 'other');
equal(col.length, 1);
});
test("`set` and model level `parse`", function() {
test('merge without mutation', function () {
var Model = Backbone.Model.extend({
parse: function (res) { return res.model; }
initialize: function (attrs, options) {
if (attrs.child) {
this.set('child', new Model(attrs.child, options), options);
}
}
});
var Collection = Backbone.Collection.extend({model: Model});
var data = [{id: 1, child: {id: 2}}];
var collection = new Collection(data);
equal(collection.first().id, 1);
collection.set(data);
equal(collection.first().id, 1);
collection.set([{id: 2, child: {id: 2}}].concat(data));
deepEqual(collection.pluck('id'), [2, 1]);
});
test("`set` and model level `parse`", function() {
var Model = Backbone.Model.extend({});
var Collection = Backbone.Collection.extend({
model: Model,
parse: function (res) { return res.models; }
parse: function (res) { return _.pluck(res.models, 'model'); }
});
var model = new Model({id: 1});
var collection = new Collection(model);
@@ -996,16 +1147,40 @@ $(document).ready(function() {
collection.set({}, {parse: true});
});
test('`set` matches input order in the absence of a comparator', function () {
var one = new Backbone.Model({id: 1});
var two = new Backbone.Model({id: 2});
var three = new Backbone.Model({id: 3});
var collection = new Backbone.Collection([one, two, three]);
collection.set([{id: 3}, {id: 2}, {id: 1}]);
deepEqual(collection.models, [three, two, one]);
collection.set([{id: 1}, {id: 2}]);
deepEqual(collection.models, [one, two]);
collection.set([two, three, one]);
deepEqual(collection.models, [two, three, one]);
collection.set([{id: 1}, {id: 2}], {remove: false});
deepEqual(collection.models, [two, three, one]);
collection.set([{id: 1}, {id: 2}, {id: 3}], {merge: false});
deepEqual(collection.models, [one, two, three]);
collection.set([three, two, one, {id: 4}], {add: false});
deepEqual(collection.models, [one, two, three]);
});
test("#1894 - Push should not trigger a sort", 0, function() {
var Collection = Backbone.Collection.extend({
comparator: 'id',
sort: function() {
ok(false);
}
sort: function() { ok(false); }
});
new Collection().push({id: 1});
});
test("#2428 - push duplicate models, return the correct one", 1, function() {
var col = new Backbone.Collection;
var model1 = col.push({id: 101});
var model2 = col.push({id: 101})
ok(model2.cid == model1.cid);
});
test("`set` with non-normal id", function() {
var Collection = Backbone.Collection.extend({
model: Backbone.Model.extend({idAttribute: '_id'})
@@ -1018,7 +1193,7 @@ $(document).ready(function() {
test("#1894 - `sort` can optionally be turned off", 0, function() {
var Collection = Backbone.Collection.extend({
comparator: 'id',
sort: function() { ok(true); }
sort: function() { ok(false); }
});
new Collection().add({id: 1}, {sort: false});
});
@@ -1053,6 +1228,25 @@ $(document).ready(function() {
Backbone.ajax = ajax;
});
test("fetch will pass extra options to success callback", 1, function () {
var SpecialSyncCollection = Backbone.Collection.extend({
url: '/test',
sync: function (method, collection, options) {
_.extend(options, { specialSync: true });
return Backbone.Collection.prototype.sync.call(this, method, collection, options);
}
});
var collection = new SpecialSyncCollection();
var onSuccess = function (collection, resp, options) {
ok(options.specialSync, "Options were passed correctly to callback");
};
collection.fetch({ success: onSuccess });
this.ajaxSettings.success();
});
test("`add` only `sort`s when necessary", 2, function () {
var collection = new (Backbone.Collection.extend({
comparator: 'a'
@@ -1081,20 +1275,334 @@ $(document).ready(function() {
collection.add(collection.models, {merge: true}); // don't sort
});
test("Attach options to collection.", 3, function() {
var url = '/somewhere';
var model = new Backbone.Model;
var comparator = function(){};
test("Attach options to collection.", 2, function() {
var Model = Backbone.Model;
var comparator = function(){};
var collection = new Backbone.Collection([], {
url: url,
model: model,
comparator: comparator
});
var collection = new Backbone.Collection([], {
model: Model,
comparator: comparator
});
strictEqual(collection.url, url);
ok(collection.model === model);
ok(collection.comparator === comparator);
ok(collection.model === Model);
ok(collection.comparator === comparator);
});
});
test("`add` overrides `set` flags", function () {
var collection = new Backbone.Collection();
collection.once('add', function (model, collection, options) {
collection.add({id: 2}, options);
});
collection.set({id: 1});
equal(collection.length, 2);
});
test("#2606 - Collection#create, success arguments", 1, function() {
var collection = new Backbone.Collection;
collection.url = 'test';
collection.create({}, {
success: function(model, resp, options) {
strictEqual(resp, 'response');
}
});
this.ajaxSettings.success('response');
});
test("#2612 - nested `parse` works with `Collection#set`", function() {
var Job = Backbone.Model.extend({
constructor: function() {
this.items = new Items();
Backbone.Model.apply(this, arguments);
},
parse: function(attrs) {
this.items.set(attrs.items, {parse: true});
return _.omit(attrs, 'items');
}
});
var Item = Backbone.Model.extend({
constructor: function() {
this.subItems = new Backbone.Collection();
Backbone.Model.apply(this, arguments);
},
parse: function(attrs) {
this.subItems.set(attrs.subItems, {parse: true});
return _.omit(attrs, 'subItems');
}
});
var Items = Backbone.Collection.extend({
model: Item
});
var data = {
name: 'JobName',
id: 1,
items: [{
id: 1,
name: 'Sub1',
subItems: [
{id: 1, subName: 'One'},
{id: 2, subName: 'Two'}
]
}, {
id: 2,
name: 'Sub2',
subItems: [
{id: 3, subName: 'Three'},
{id: 4, subName: 'Four'}
]
}]
};
var newData = {
name: 'NewJobName',
id: 1,
items: [{
id: 1,
name: 'NewSub1',
subItems: [
{id: 1,subName: 'NewOne'},
{id: 2,subName: 'NewTwo'}
]
}, {
id: 2,
name: 'NewSub2',
subItems: [
{id: 3,subName: 'NewThree'},
{id: 4,subName: 'NewFour'}
]
}]
};
var job = new Job(data, {parse: true});
equal(job.get('name'), 'JobName');
equal(job.items.at(0).get('name'), 'Sub1');
equal(job.items.length, 2);
equal(job.items.get(1).subItems.get(1).get('subName'), 'One');
equal(job.items.get(2).subItems.get(3).get('subName'), 'Three');
job.set(job.parse(newData, {parse: true}));
equal(job.get('name'), 'NewJobName');
equal(job.items.at(0).get('name'), 'NewSub1');
equal(job.items.length, 2);
equal(job.items.get(1).subItems.get(1).get('subName'), 'NewOne');
equal(job.items.get(2).subItems.get(3).get('subName'), 'NewThree');
});
test('_addReference binds all collection events & adds to the lookup hashes', 9, function() {
var calls = {add: 0, remove: 0};
var Collection = Backbone.Collection.extend({
_addReference: function(model) {
Backbone.Collection.prototype._addReference.apply(this, arguments);
calls.add++;
equal(model, this._byId[model.id]);
equal(model, this._byId[model.cid]);
equal(model._events.all.length, 1);
},
_removeReference: function(model) {
Backbone.Collection.prototype._removeReference.apply(this, arguments);
calls.remove++;
equal(this._byId[model.id], void 0);
equal(this._byId[model.cid], void 0);
equal(model.collection, void 0);
equal(model._events, void 0);
}
});
var collection = new Collection();
var model = collection.add({id: 1});
collection.remove(model);
equal(calls.add, 1);
equal(calls.remove, 1);
});
test('Do not allow duplicate models to be `add`ed or `set`', function() {
var c = new Backbone.Collection();
c.add([{id: 1}, {id: 1}]);
equal(c.length, 1);
equal(c.models.length, 1);
c.set([{id: 1}, {id: 1}]);
equal(c.length, 1);
equal(c.models.length, 1);
});
test('#3020: #set with {add: false} should not throw.', 2, function() {
var collection = new Backbone.Collection;
collection.set([{id: 1}], {add: false});
strictEqual(collection.length, 0);
strictEqual(collection.models.length, 0);
});
test("create with wait, model instance, #3028", 1, function() {
var collection = new Backbone.Collection();
var model = new Backbone.Model({id: 1});
model.sync = function(){
equal(this.collection, collection);
};
collection.create(model, {wait: true});
});
test("modelId", function() {
var Stooge = Backbone.Model.extend();
var StoogeCollection = Backbone.Collection.extend({model: Stooge});
// Default to using `Collection::model::idAttribute`.
equal(StoogeCollection.prototype.modelId({id: 1}), 1);
Stooge.prototype.idAttribute = '_id';
equal(StoogeCollection.prototype.modelId({_id: 1}), 1);
});
test('Polymorphic models work with "simple" constructors', function () {
var A = Backbone.Model.extend();
var B = Backbone.Model.extend();
var C = Backbone.Collection.extend({
model: function (attrs) {
return attrs.type === 'a' ? new A(attrs) : new B(attrs);
}
});
var collection = new C([{id: 1, type: 'a'}, {id: 2, type: 'b'}]);
equal(collection.length, 2);
ok(collection.at(0) instanceof A);
equal(collection.at(0).id, 1);
ok(collection.at(1) instanceof B);
equal(collection.at(1).id, 2);
});
test('Polymorphic models work with "advanced" constructors', function () {
var A = Backbone.Model.extend({idAttribute: '_id'});
var B = Backbone.Model.extend({idAttribute: '_id'});
var C = Backbone.Collection.extend({
model: Backbone.Model.extend({
constructor: function (attrs) {
return attrs.type === 'a' ? new A(attrs) : new B(attrs);
},
idAttribute: '_id'
})
});
var collection = new C([{_id: 1, type: 'a'}, {_id: 2, type: 'b'}]);
equal(collection.length, 2);
ok(collection.at(0) instanceof A);
equal(collection.at(0), collection.get(1));
ok(collection.at(1) instanceof B);
equal(collection.at(1), collection.get(2));
C = Backbone.Collection.extend({
model: function (attrs) {
return attrs.type === 'a' ? new A(attrs) : new B(attrs);
},
modelId: function (attrs) {
return attrs.type + '-' + attrs.id;
}
});
collection = new C([{id: 1, type: 'a'}, {id: 1, type: 'b'}]);
equal(collection.length, 2);
ok(collection.at(0) instanceof A);
equal(collection.at(0), collection.get('a-1'));
ok(collection.at(1) instanceof B);
equal(collection.at(1), collection.get('b-1'));
});
test("#3039: adding at index fires with correct at", 3, function() {
var col = new Backbone.Collection([{at: 0}, {at: 4}]);
col.on('add', function(model, col, options) {
equal(model.get('at'), options.index);
});
col.add([{at: 1}, {at: 2}, {at: 3}], {at: 1});
});
test("#3039: index is not sent when at is not specified", 2, function() {
var col = new Backbone.Collection([{at: 0}]);
col.on('add', function(model, col, options) {
equal(undefined, options.index);
});
col.add([{at: 1}, {at: 2}]);
});
test('#3199 - Order changing should trigger a sort', 1, function() {
var one = new Backbone.Model({id: 1});
var two = new Backbone.Model({id: 2});
var three = new Backbone.Model({id: 3});
var collection = new Backbone.Collection([one, two, three]);
collection.on('sort', function() {
ok(true);
});
collection.set([{id: 3}, {id: 2}, {id: 1}]);
});
test('#3199 - Adding a model should trigger a sort', 1, function() {
var one = new Backbone.Model({id: 1});
var two = new Backbone.Model({id: 2});
var three = new Backbone.Model({id: 3});
var collection = new Backbone.Collection([one, two, three]);
collection.on('sort', function() {
ok(true);
});
collection.set([{id: 3}, {id: 2}, {id: 1}, {id: 0}]);
})
test('#3199 - Order not changing should not trigger a sort', 0, function() {
var one = new Backbone.Model({id: 1});
var two = new Backbone.Model({id: 2});
var three = new Backbone.Model({id: 3});
var collection = new Backbone.Collection([one, two, three]);
collection.on('sort', function() {
ok(false);
});
collection.set([{id: 1}, {id: 2}, {id: 3}]);
});
test("add supports negative indexes", 1, function() {
var collection = new Backbone.Collection([{id: 1}]);
collection.add([{id: 2}, {id: 3}], {at: -1});
collection.add([{id: 2.5}], {at: -2});
equal(collection.pluck('id').join(','), "1,2,2.5,3");
});
test("#set accepts options.at as a string", 1, function() {
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
collection.add([{id: 3}], {at: '1'});
deepEqual(collection.pluck('id'), [1, 3, 2]);
});
test("adding multiple models triggers `set` event once", 1, function() {
var collection = new Backbone.Collection;
collection.on('update', function() { ok(true); });
collection.add([{id: 1}, {id: 2}, {id: 3}]);
});
test("removing models triggers `set` event once", 1, function() {
var collection = new Backbone.Collection([{id: 1}, {id: 2}, {id: 3}]);
collection.on('update', function() { ok(true); });
collection.remove([{id: 1}, {id: 2}]);
});
test("remove does not trigger `set` when nothing removed", 0, function() {
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
collection.on('update', function() { ok(false); });
collection.remove([{id: 3}]);
});
test("set triggers `set` event once", 1, function() {
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
collection.on('update', function() { ok(true); });
collection.set([{id: 1}, {id: 3}]);
});
test("set does not trigger `set` event when nothing added nor removed", 0, function() {
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
collection.on('update', function() { ok(false); });
collection.set([{id: 1}, {id: 2}]);
});
})();

View File

@@ -1,45 +0,0 @@
(function() {
var Environment = this.Environment = function(){};
_.extend(Environment.prototype, {
ajax: Backbone.ajax,
sync: Backbone.sync,
emulateHTTP: Backbone.emulateHTTP,
emulateJSON: Backbone.emulateJSON,
setup: function() {
var env = this;
// Capture ajax settings for comparison.
Backbone.ajax = function(settings) {
env.ajaxSettings = settings;
};
// Capture the arguments to Backbone.sync for comparison.
Backbone.sync = function(method, model, options) {
env.syncArgs = {
method: method,
model: model,
options: options
};
env.sync.apply(this, arguments);
};
},
teardown: function() {
this.syncArgs = null;
this.ajaxSettings = null;
Backbone.sync = this.sync;
Backbone.ajax = this.ajax;
Backbone.emulateHTTP = this.emulateHTTP;
Backbone.emulateJSON = this.emulateJSON;
}
});
})();

View File

@@ -1,4 +1,4 @@
$(document).ready(function() {
(function() {
module("Backbone.Events");
@@ -106,6 +106,19 @@ $(document).ready(function() {
b.trigger('event2');
});
test("listenToOnce", 2, function() {
// Same as the previous test, but we use once rather than having to explicitly unbind
var obj = { counterA: 0, counterB: 0 };
_.extend(obj, Backbone.Events);
var incrA = function(){ obj.counterA += 1; obj.trigger('event'); };
var incrB = function(){ obj.counterB += 1; };
obj.listenToOnce(obj, 'event', incrA);
obj.listenToOnce(obj, 'event', incrB);
obj.trigger('event');
equal(obj.counterA, 1, 'counterA should have only been incremented once.');
equal(obj.counterB, 1, 'counterB should have only been incremented once.');
});
test("listenToOnce and stopListening", 1, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
@@ -152,6 +165,114 @@ $(document).ready(function() {
e.trigger("foo");
});
test("stopListening cleans up references", 12, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
var fn = function() {};
b.on('event', fn);
a.listenTo(b, 'event', fn).stopListening();
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn).stopListening(b);
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn).stopListening(b, 'event');
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn).stopListening(b, 'event', fn);
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
});
test("stopListening cleans up references from listenToOnce", 12, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
var fn = function() {};
b.on('event', fn);
a.listenToOnce(b, 'event', fn).stopListening();
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenToOnce(b, 'event', fn).stopListening(b);
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenToOnce(b, 'event', fn).stopListening(b, 'event');
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenToOnce(b, 'event', fn).stopListening(b, 'event', fn);
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
});
test("listenTo and off cleaning up references", 8, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
var fn = function() {};
a.listenTo(b, 'event', fn);
b.off();
equal(_.size(a._listeningTo), 0);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn);
b.off('event');
equal(_.size(a._listeningTo), 0);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn);
b.off(null, fn);
equal(_.size(a._listeningTo), 0);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn);
b.off(null, null, a);
equal(_.size(a._listeningTo), 0);
equal(_.size(b._listeners), 0);
});
test("listenTo and stopListening cleaning up references", 2, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenTo(b, 'all', function(){ ok(true); });
b.trigger('anything');
a.listenTo(b, 'other', function(){ ok(false); });
a.stopListening(b, 'other');
a.stopListening(b, 'all');
equal(_.size(a._listeningTo), 0);
});
test("listenToOnce without context cleans up references after the event has fired", 2, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenToOnce(b, 'all', function(){ ok(true); });
b.trigger('anything');
equal(_.size(a._listeningTo), 0);
});
test("listenToOnce with event maps cleans up references", 2, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenToOnce(b, {
one: function() { ok(true); },
two: function() { ok(false); }
});
b.trigger('one');
equal(_.size(a._listeningTo), 1);
});
test("listenToOnce with event maps binds the correct `this`", 1, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenToOnce(b, {
one: function() { ok(this === a); },
two: function() { ok(false); }
});
b.trigger('one');
});
test("listenTo with empty callback doesn't throw an error", 1, function(){
var e = _.extend({}, Backbone.Events);
e.listenTo(e, "foo", null);
@@ -252,15 +373,14 @@ $(document).ready(function() {
test("callback list is not altered during trigger", 2, function () {
var counter = 0, obj = _.extend({}, Backbone.Events);
var incr = function(){ counter++; };
obj.on('event', function(){ obj.on('event', incr).on('all', incr); })
.trigger('event');
equal(counter, 0, 'bind does not alter callback list');
obj.off()
.on('event', function(){ obj.off('event', incr).off('all', incr); })
.on('event', incr)
.on('all', incr)
.trigger('event');
equal(counter, 2, 'unbind does not alter callback list');
var incrOn = function(){ obj.on('event all', incr); };
var incrOff = function(){ obj.off('event all', incr); };
obj.on('event all', incrOn).trigger('event');
equal(counter, 0, 'on does not alter callback list');
obj.off().on('event', incrOff).on('event all', incr).trigger('event');
equal(counter, 2, 'off does not alter callback list');
});
test("#1282 - 'all' callback list is retrieved after each event.", 1, function() {
@@ -432,6 +552,11 @@ $(document).ready(function() {
_.extend({}, Backbone.Events).once('event').trigger('event');
});
test("listenToOnce without a callback is a noop", 0, function() {
var obj = _.extend({}, Backbone.Events);
obj.listenToOnce(obj, 'event').trigger('event');
});
test("event functions are chainable", function() {
var obj = _.extend({}, Backbone.Events);
var obj2 = _.extend({}, Backbone.Events);
@@ -449,4 +574,15 @@ $(document).ready(function() {
equal(obj, obj.stopListening());
});
});
test("#3448 - listenToOnce with space-separated events", 2, function() {
var one = _.extend({}, Backbone.Events);
var two = _.extend({}, Backbone.Events);
var count = 1;
one.listenToOnce(two, 'x y', function(n) { ok(n === count++); });
two.trigger('x', 1);
two.trigger('x', 1);
two.trigger('y', 2);
two.trigger('y', 2);
});
})();

View File

@@ -1,4 +1,4 @@
$(document).ready(function() {
(function() {
var proxy = Backbone.Model.extend();
var klass = Backbone.Collection.extend({
@@ -6,10 +6,9 @@ $(document).ready(function() {
});
var doc, collection;
module("Backbone.Model", _.extend(new Environment, {
module("Backbone.Model", {
setup: function() {
Environment.prototype.setup.apply(this, arguments);
doc = new proxy({
id : '1-the-tempest',
title : "The Tempest",
@@ -20,7 +19,7 @@ $(document).ready(function() {
collection.add(doc);
}
}));
});
test("initialize", 3, function() {
var Model = Backbone.Model.extend({
@@ -84,7 +83,7 @@ $(document).ready(function() {
doc.collection.url = '/collection/';
equal(doc.url(), '/collection/1-the-tempest');
doc.collection = null;
raises(function() { doc.url(); });
throws(function() { doc.url(); });
doc.collection = collection;
});
@@ -111,13 +110,6 @@ $(document).ready(function() {
equal(model.url(), '/nested/1/collection/2');
});
test('url and urlRoot are directly attached if passed in the options', 2, function () {
var model = new Backbone.Model({a: 1}, {url: '/test'});
var model2 = new Backbone.Model({a: 2}, {urlRoot: '/test2'});
equal(model.url, '/test');
equal(model2.urlRoot, '/test2');
});
test("underscore methods", 5, function() {
var model = new Backbone.Model({ 'foo': 'a', 'bar': 'b', 'baz': 'c' });
var model2 = model.clone();
@@ -128,6 +120,11 @@ $(document).ready(function() {
deepEqual(model.omit('foo', 'bar'), {'baz': 'c'});
});
test("chain", function() {
var model = new Backbone.Model({ a: 0, b: 1, c: 2 });
deepEqual(model.chain().pick("a", "b", "c").values().compact().value(), [1, 2]);
});
test("clone", 10, function() {
var a = new Backbone.Model({ 'foo': 1, 'bar': 2, 'baz': 3});
var b = a.clone();
@@ -207,6 +204,32 @@ $(document).ready(function() {
strictEqual(model.has('undefined'), false);
});
test("matches", 4, function() {
var model = new Backbone.Model();
strictEqual(model.matches({'name': 'Jonas', 'cool': true}), false);
model.set({name: 'Jonas', 'cool': true});
strictEqual(model.matches({'name': 'Jonas'}), true);
strictEqual(model.matches({'name': 'Jonas', 'cool': true}), true);
strictEqual(model.matches({'name': 'Jonas', 'cool': false}), false);
});
test("matches with predicate", function() {
var model = new Backbone.Model({a: 0});
strictEqual(model.matches(function(attr) {
return attr.a > 1 && attr.b != null;
}), false);
model.set({a: 3, b: true});
strictEqual(model.matches(function(attr) {
return attr.a > 1 && attr.b != null;
}), true);
})
test("set and unset", 8, function() {
var a = new Backbone.Model({id: 'id', foo: 1, bar: 2, baz: 3});
var changeCount = 0;
@@ -270,6 +293,26 @@ $(document).ready(function() {
model.set({result: void 0});
});
test("nested set triggers with the correct options", function() {
var model = new Backbone.Model();
var o1 = {};
var o2 = {};
var o3 = {};
model.on('change', function(__, options) {
switch (model.get('a')) {
case 1:
equal(options, o1);
return model.set('a', 2, o2);
case 2:
equal(options, o2);
return model.set('a', 3, o3);
case 3:
equal(options, o3);
}
});
model.set('a', 1, o1);
});
test("multiple unsets", 1, function() {
var i = 0;
var counter = function(){ i++; };
@@ -300,6 +343,31 @@ $(document).ready(function() {
equal(model.isNew(), true);
});
test("setting an alternative cid prefix", 4, function() {
var Model = Backbone.Model.extend({
cidPrefix: 'm'
});
var model = new Model();
equal(model.cid.charAt(0), 'm');
model = new Backbone.Model();
equal(model.cid.charAt(0), 'c');
var Collection = Backbone.Collection.extend({
model: Model
});
var collection = new Collection([{id: 'c5'}, {id: 'c6'}, {id: 'c7'}]);
equal(collection.get('c6').cid.charAt(0), 'm');
collection.set([{id: 'c6', value: 'test'}], {
merge: true,
add: true,
remove: false
});
ok(collection.get('c6').has('value'));
});
test("set an empty string", 1, function() {
var model = new Backbone.Model({name : "Model"});
model.set({name : ''});
@@ -448,6 +516,40 @@ $(document).ready(function() {
model.destroy();
});
test("#3283 - save, fetch, destroy calls success with context", 3, function () {
var model = new Backbone.Model();
var obj = {};
var options = {
context: obj,
success: function() {
equal(this, obj);
}
};
model.sync = function (method, model, options) {
options.success.call(options.context);
};
model.save({data: 2, id: 1}, options);
model.fetch(options);
model.destroy(options);
});
test("#3283 - save, fetch, destroy calls error with context", 3, function () {
var model = new Backbone.Model();
var obj = {};
var options = {
context: obj,
error: function() {
equal(this, obj);
}
};
model.sync = function (method, model, options) {
options.error.call(options.context);
};
model.save({data: 2, id: 1}, options);
model.fetch(options);
model.destroy(options);
});
test("save with PATCH", function() {
doc.clear().set({id: 1, a: 1, b: 2, c: 3, d: 4});
doc.save();
@@ -462,6 +564,14 @@ $(document).ready(function() {
equal(this.ajaxSettings.data, "{\"b\":2,\"d\":4}");
});
test("save with PATCH and different attrs", function() {
doc.clear().save({b: 2, d: 4}, {patch: true, attrs: {B: 1, D: 3}});
equal(this.syncArgs.options.attrs.D, 3);
equal(this.syncArgs.options.attrs.d, undefined);
equal(this.ajaxSettings.data, "{\"B\":1,\"D\":3}");
deepEqual(doc.attributes, {b: 2, d: 4});
});
test("save in positional style", 1, function() {
var model = new Backbone.Model();
model.sync = function(method, model, options) {
@@ -484,12 +594,59 @@ $(document).ready(function() {
});
});
test("save with wait and supplied id", function() {
var Model = Backbone.Model.extend({
urlRoot: '/collection'
});
var model = new Model();
model.save({id: 42}, {wait: true});
equal(this.ajaxSettings.url, '/collection/42');
});
test("save will pass extra options to success callback", 1, function () {
var SpecialSyncModel = Backbone.Model.extend({
sync: function (method, model, options) {
_.extend(options, { specialSync: true });
return Backbone.Model.prototype.sync.call(this, method, model, options);
},
urlRoot: '/test'
});
var model = new SpecialSyncModel();
var onSuccess = function (model, response, options) {
ok(options.specialSync, "Options were passed correctly to callback");
};
model.save(null, { success: onSuccess });
this.ajaxSettings.success();
});
test("fetch", 2, function() {
doc.fetch();
equal(this.syncArgs.method, 'read');
ok(_.isEqual(this.syncArgs.model, doc));
});
test("fetch will pass extra options to success callback", 1, function () {
var SpecialSyncModel = Backbone.Model.extend({
sync: function (method, model, options) {
_.extend(options, { specialSync: true });
return Backbone.Model.prototype.sync.call(this, method, model, options);
},
urlRoot: '/test'
});
var model = new SpecialSyncModel();
var onSuccess = function (model, response, options) {
ok(options.specialSync, "Options were passed correctly to callback");
};
model.fetch({ success: onSuccess });
this.ajaxSettings.success();
});
test("destroy", 3, function() {
doc.destroy();
equal(this.syncArgs.method, 'delete');
@@ -499,6 +656,25 @@ $(document).ready(function() {
equal(newModel.destroy(), false);
});
test("destroy will pass extra options to success callback", 1, function () {
var SpecialSyncModel = Backbone.Model.extend({
sync: function (method, model, options) {
_.extend(options, { specialSync: true });
return Backbone.Model.prototype.sync.call(this, method, model, options);
},
urlRoot: '/test'
});
var model = new SpecialSyncModel({ id: 'id' });
var onSuccess = function (model, response, options) {
ok(options.specialSync, "Options were passed correctly to callback");
};
model.destroy({ success: onSuccess });
this.ajaxSettings.success();
});
test("non-persisted destroy", 1, function() {
var a = new Backbone.Model({ 'foo': 1, 'bar': 2, 'baz': 3});
a.sync = function() { throw "should not be called"; };
@@ -712,6 +888,22 @@ $(document).ready(function() {
ok(this.syncArgs.model === model);
});
test("save without `wait` doesn't set invalid attributes", function () {
var model = new Backbone.Model();
model.validate = function () { return 1; }
model.save({a: 1});
equal(model.get('a'), void 0);
});
test("save doesn't validate twice", function () {
var model = new Backbone.Model();
var times = 0;
model.sync = function () {};
model.validate = function () { ++times; }
model.save({});
equal(times, 1);
});
test("`hasChanged` for falsey keys", 2, function() {
var model = new Backbone.Model();
model.set({x: true}, {silent: true});
@@ -939,11 +1131,14 @@ $(document).ready(function() {
model.destroy();
});
test("#1365 - Destroy: New models execute success callback.", 2, function() {
asyncTest("#1365 - Destroy: New models execute success callback.", 2, function() {
new Backbone.Model()
.on('sync', function() { ok(false); })
.on('destroy', function(){ ok(true); })
.destroy({ success: function(){ ok(true); }});
.destroy({ success: function(){
ok(true);
start();
}});
});
test("#1433 - Save: An invalid model cannot be persisted.", 1, function() {
@@ -1099,4 +1294,4 @@ $(document).ready(function() {
model.set({a: true});
});
});
})();

View File

@@ -1,4 +1,4 @@
$(document).ready(function() {
(function() {
module("Backbone.noConflict");
@@ -9,4 +9,4 @@ $(document).ready(function() {
equal(window.Backbone, noconflictBackbone, 'Backbone is still pointing to the original Backbone');
});
});
})();

View File

@@ -1,14 +1,14 @@
$(document).ready(function() {
(function() {
var router = null;
var location = null;
var lastRoute = null;
var lastArgs = [];
function onRoute(router, route, args) {
var onRoute = function(router, route, args) {
lastRoute = route;
lastArgs = args;
}
};
var Location = function(href) {
this.replace(href);
@@ -16,8 +16,11 @@ $(document).ready(function() {
_.extend(Location.prototype, {
parser: document.createElement('a'),
replace: function(href) {
_.extend(this, _.pick($('<a></a>', {href: href})[0],
this.parser.href = href;
_.extend(this, _.pick(this.parser,
'href',
'hash',
'host',
@@ -64,7 +67,7 @@ $(document).ready(function() {
this.value = value;
}
};
_.bindAll(ExternalObject);
_.bindAll(ExternalObject, 'routingFunction');
var Router = Backbone.Router.extend({
@@ -75,6 +78,8 @@ $(document).ready(function() {
"counter": "counter",
"search/:query": "search",
"search/:query/p:page": "search",
"charñ": "charUTF",
"char%C3%B1": "charEscaped",
"contacts": "contacts",
"contacts/new": "newContact",
"contacts/:id": "loadContact",
@@ -85,7 +90,7 @@ $(document).ready(function() {
":repo/compare/*from...*to": "github",
"decode/:named/*splat": "decode",
"*first/complex-*part/*rest": "complex",
":entity?*args": "query",
"query/:entity": "query",
"function/:value": ExternalObject.routingFunction,
"*anything": "anything"
},
@@ -103,11 +108,19 @@ $(document).ready(function() {
this.count++;
},
search : function(query, page) {
search: function(query, page) {
this.query = query;
this.page = page;
},
charUTF: function() {
this.charType = 'UTF';
},
charEscaped: function() {
this.charType = 'escaped';
},
contacts: function(){
this.contact = 'index';
},
@@ -198,12 +211,21 @@ $(document).ready(function() {
equal(router.page, '20');
});
test("routes via navigate with params", 1, function() {
Backbone.history.navigate('query/test?a=b', {trigger: true});
equal(router.queryArgs, 'a=b');
});
test("routes via navigate for backwards-compatibility", 2, function() {
Backbone.history.navigate('search/manhattan/p20', true);
equal(router.query, 'manhattan');
equal(router.page, '20');
});
test("reports matched route via nagivate", 1, function() {
ok(Backbone.history.navigate('search/manhattan/p20', true));
});
test("route precedence via navigate", 6, function(){
// check both 0.9.x and backwards-compatibility options
_.each([ { trigger: true }, true ], function( options ){
@@ -271,7 +293,7 @@ $(document).ready(function() {
});
test("routes (query)", 5, function() {
location.replace('http://example.com#mandel?a=b&c=d');
location.replace('http://example.com#query/mandel?a=b&c=d');
Backbone.history.checkUrl();
equal(router.entity, 'mandel');
equal(router.queryArgs, 'a=b&c=d');
@@ -309,6 +331,36 @@ $(document).ready(function() {
Backbone.history.checkUrl();
});
test("No events are triggered if #execute returns false.", 1, function() {
var Router = Backbone.Router.extend({
routes: {
foo: function() {
ok(true);
}
},
execute: function(callback, args) {
callback.apply(this, args);
return false;
}
});
var router = new Router;
router.on('route route:foo', function() {
ok(false);
});
Backbone.history.on('route', function() {
ok(false);
});
location.replace('http://example.com#foo');
Backbone.history.checkUrl();
});
test("#933, #908 - leading slash", 2, function() {
location.replace('http://example.com/root/foo');
@@ -323,14 +375,6 @@ $(document).ready(function() {
strictEqual(Backbone.history.getFragment(), 'foo');
});
test("#1003 - History is started before navigate is called", 1, function() {
Backbone.history.stop();
Backbone.history.navigate = function(){ ok(Backbone.History.started); };
Backbone.history.start();
// If this is not an old IE navigate will not be called.
if (!Backbone.history.iframe) ok(true);
});
test("#967 - Route callback gets passed encoded values.", 3, function() {
var route = 'has%2Fslash/complex-has%23hash/has%20space';
Backbone.history.navigate(route, {trigger: true});
@@ -349,6 +393,13 @@ $(document).ready(function() {
equal(lastRoute, 'search');
});
test("#2666 - Hashes with UTF8 in them.", 2, function() {
Backbone.history.navigate('charñ', {trigger: true});
equal(router.charType, 'UTF');
Backbone.history.navigate('char%C3%B1', {trigger: true});
equal(router.charType, 'UTF');
});
test("#1185 - Use pathname when hashChange is not wanted.", 1, function() {
Backbone.history.stop();
location.replace('http://example.com/path/name#hash');
@@ -514,7 +565,7 @@ $(document).ready(function() {
Backbone.history.stop();
location.replace('http://example.com/root/x/y?a=b');
location.replace = function(url) {
strictEqual(url, '/root/?a=b#x/y');
strictEqual(url, '/root#x/y?a=b');
};
Backbone.history = _.extend(new Backbone.History, {
location: location,
@@ -531,7 +582,7 @@ $(document).ready(function() {
test("#1695 - hashChange to pushState with search.", 1, function() {
Backbone.history.stop();
location.replace('http://example.com/root?a=b#x/y');
location.replace('http://example.com/root#x/y?a=b');
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
@@ -580,7 +631,7 @@ $(document).ready(function() {
test("#2062 - Trigger 'route' event on router instance.", 2, function() {
router.on('route', function(name, args) {
strictEqual(name, 'routeEvent');
deepEqual(args, ['x']);
deepEqual(args, ['x', null]);
});
location.replace('http://example.com#route-event/x');
Backbone.history.checkUrl();
@@ -609,4 +660,339 @@ $(document).ready(function() {
deepEqual({home: "root", index: "index.html", show: "show", search: "search"}, router.routes);
});
});
test("#2538 - hashChange to pushState only if both requested.", 0, function() {
Backbone.history.stop();
location.replace('http://example.com/root?a=b#x/y');
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
pushState: function(){},
replaceState: function(){ ok(false); }
}
});
Backbone.history.start({
root: 'root',
pushState: true,
hashChange: false
});
});
test('No hash fallback.', 0, function() {
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
pushState: function(){},
replaceState: function(){}
}
});
var Router = Backbone.Router.extend({
routes: {
hash: function() { ok(false); }
}
});
var router = new Router;
location.replace('http://example.com/');
Backbone.history.start({
pushState: true,
hashChange: false
});
location.replace('http://example.com/nomatch#hash');
Backbone.history.checkUrl();
});
test('#2656 - No trailing slash on root.', 1, function() {
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
pushState: function(state, title, url){
strictEqual(url, '/root');
}
}
});
location.replace('http://example.com/root/path');
Backbone.history.start({pushState: true, hashChange: false, root: 'root'});
Backbone.history.navigate('');
});
test('#2656 - No trailing slash on root.', 1, function() {
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
pushState: function(state, title, url) {
strictEqual(url, '/');
}
}
});
location.replace('http://example.com/path');
Backbone.history.start({pushState: true, hashChange: false});
Backbone.history.navigate('');
});
test('#2656 - No trailing slash on root.', 1, function() {
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
pushState: function(state, title, url){
strictEqual(url, '/root?x=1');
}
}
});
location.replace('http://example.com/root/path');
Backbone.history.start({pushState: true, hashChange: false, root: 'root'});
Backbone.history.navigate('?x=1');
});
test('#2765 - Fragment matching sans query/hash.', 2, function() {
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
pushState: function(state, title, url) {
strictEqual(url, '/path?query#hash');
}
}
});
var Router = Backbone.Router.extend({
routes: {
path: function() { ok(true); }
}
});
var router = new Router;
location.replace('http://example.com/');
Backbone.history.start({pushState: true, hashChange: false});
Backbone.history.navigate('path?query#hash', true);
});
test('Do not decode the search params.', function() {
var Router = Backbone.Router.extend({
routes: {
path: function(params){
strictEqual(params, 'x=y%3Fz');
}
}
});
var router = new Router;
Backbone.history.navigate('path?x=y%3Fz', true);
});
test('Navigate to a hash url.', function() {
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
Backbone.history.start({pushState: true});
var Router = Backbone.Router.extend({
routes: {
path: function(params) {
strictEqual(params, 'x=y');
}
}
});
var router = new Router;
location.replace('http://example.com/path?x=y#hash');
Backbone.history.checkUrl();
});
test('#navigate to a hash url.', function() {
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
Backbone.history.start({pushState: true});
var Router = Backbone.Router.extend({
routes: {
path: function(params) {
strictEqual(params, 'x=y');
}
}
});
var router = new Router;
Backbone.history.navigate('path?x=y#hash', true);
});
test('unicode pathname', 1, function() {
location.replace('http://example.com/myyjä');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {
myyjä: function() {
ok(true);
}
}
});
new Router;
Backbone.history.start({pushState: true});
});
test('unicode pathname with % in a parameter', 1, function() {
location.replace('http://example.com/myyjä/foo%20%25%3F%2f%40%25%20bar');
location.pathname = '/myyj%C3%A4/foo%20%25%3F%2f%40%25%20bar';
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {
'myyjä/:query': function(query) {
strictEqual(query, 'foo %?/@% bar');
}
}
});
new Router;
Backbone.history.start({pushState: true});
});
test('newline in route', 1, function() {
location.replace('http://example.com/stuff%0Anonsense?param=foo%0Abar');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {
'stuff\nnonsense': function() {
ok(true);
}
}
});
new Router;
Backbone.history.start({pushState: true});
});
test('Router#execute receives callback, args, name.', 3, function() {
location.replace('http://example.com#foo/123/bar?x=y');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {'foo/:id/bar': 'foo'},
foo: function(){},
execute: function(callback, args, name) {
strictEqual(callback, this.foo);
deepEqual(args, ['123', 'x=y']);
strictEqual(name, 'foo');
}
});
var router = new Router;
Backbone.history.start();
});
test("pushState to hashChange with only search params.", 1, function() {
Backbone.history.stop();
location.replace('http://example.com?a=b');
location.replace = function(url) {
strictEqual(url, '/#?a=b');
};
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: null
});
Backbone.history.start({pushState: true});
});
test("#3123 - History#navigate decodes before comparison.", 1, function() {
Backbone.history.stop();
location.replace('http://example.com/shop/search?keyword=short%20dress');
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
pushState: function(){ ok(false); },
replaceState: function(){ ok(false); }
}
});
Backbone.history.start({pushState: true});
Backbone.history.navigate('shop/search?keyword=short%20dress', true);
strictEqual(Backbone.history.fragment, 'shop/search?keyword=short dress');
});
test('#3175 - Urls in the params', 1, function() {
Backbone.history.stop();
location.replace('http://example.com#login?a=value&backUrl=https%3A%2F%2Fwww.msn.com%2Fidp%2Fidpdemo%3Fspid%3Dspdemo%26target%3Db');
Backbone.history = _.extend(new Backbone.History, {location: location});
var router = new Backbone.Router;
router.route('login', function(params) {
strictEqual(params, 'a=value&backUrl=https%3A%2F%2Fwww.msn.com%2Fidp%2Fidpdemo%3Fspid%3Dspdemo%26target%3Db');
});
Backbone.history.start();
});
test('#3358 - pushState to hashChange transition with search params', 1, function() {
Backbone.history.stop();
location.replace('/root?foo=bar');
location.replace = function(url) {
strictEqual(url, '/root#?foo=bar');
};
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
pushState: undefined,
replaceState: undefined
}
});
Backbone.history.start({root: '/root', pushState: true});
});
test("Paths that don't match the root should not match no root", 0, function() {
location.replace('http://example.com/foo');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {
foo: function(){
ok(false, 'should not match unless root matches');
}
}
});
var router = new Router;
Backbone.history.start({root: 'root', pushState: true});
});
test("Paths that don't match the root should not match roots of the same length", 0, function() {
location.replace('http://example.com/xxxx/foo');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {
foo: function(){
ok(false, 'should not match unless root matches');
}
}
});
var router = new Router;
Backbone.history.start({root: 'root', pushState: true});
});
test("roots with regex characters", 1, function() {
location.replace('http://example.com/x+y.z/foo');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {foo: function(){ ok(true); }}
});
var router = new Router;
Backbone.history.start({root: 'x+y.z', pushState: true});
});
test("roots with unicode characters", 1, function() {
location.replace('http://example.com/®ooτ/foo');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {foo: function(){ ok(true); }}
});
var router = new Router;
Backbone.history.start({root: '®ooτ', pushState: true});
});
test("roots without slash", 1, function() {
location.replace('http://example.com/®ooτ');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {'': function(){ ok(true); }}
});
var router = new Router;
Backbone.history.start({root: '®ooτ', pushState: true});
});
})();

View File

@@ -0,0 +1,6 @@
$('body').append(
'<div id="qunit"></div>' +
'<div id="qunit-fixture">' +
'<div id="testElement"><h1>Test</h1></div>' +
'</div>'
);

View File

@@ -0,0 +1,43 @@
(function() {
var sync = Backbone.sync;
var ajax = Backbone.ajax;
var emulateHTTP = Backbone.emulateHTTP;
var emulateJSON = Backbone.emulateJSON;
var history = window.history;
var pushState = history.pushState;
var replaceState = history.replaceState;
QUnit.testStart(function() {
var env = QUnit.config.current.testEnvironment;
// We never want to actually call these during tests.
history.pushState = history.replaceState = function(){};
// Capture ajax settings for comparison.
Backbone.ajax = function(settings) {
env.ajaxSettings = settings;
};
// Capture the arguments to Backbone.sync for comparison.
Backbone.sync = function(method, model, options) {
env.syncArgs = {
method: method,
model: model,
options: options
};
sync.apply(this, arguments);
};
});
QUnit.testDone(function() {
Backbone.sync = sync;
Backbone.ajax = ajax;
Backbone.emulateHTTP = emulateHTTP;
Backbone.emulateJSON = emulateJSON;
history.pushState = pushState;
history.replaceState = replaceState;
});
})();

View File

@@ -1,4 +1,4 @@
$(document).ready(function() {
(function() {
var Library = Backbone.Collection.extend({
url : function() { return '/library'; }
@@ -11,20 +11,18 @@ $(document).ready(function() {
length : 123
};
module("Backbone.sync", _.extend(new Environment, {
module("Backbone.sync", {
setup : function() {
Environment.prototype.setup.apply(this, arguments);
library = new Library;
library.create(attrs, {wait: false});
},
teardown: function() {
Environment.prototype.teardown.apply(this, arguments);
Backbone.emulateHTTP = false;
}
}));
});
test("read", 4, function() {
library.fetch();
@@ -133,7 +131,7 @@ $(document).ready(function() {
test("urlError", 2, function() {
var model = new Backbone.Model();
raises(function() {
throws(function() {
model.fetch();
});
model.fetch({url: '/one/two'});
@@ -209,4 +207,15 @@ $(document).ready(function() {
strictEqual(this.ajaxSettings.beforeSend(xhr), false);
});
});
test('#2928 - Pass along `textStatus` and `errorThrown`.', 2, function() {
var model = new Backbone.Model;
model.url = '/test';
model.on('error', function(model, xhr, options) {
strictEqual(options.textStatus, 'textStatus');
strictEqual(options.errorThrown, 'errorThrown');
});
model.fetch();
this.ajaxSettings.error({}, 'textStatus', 'errorThrown');
});
})();

View File

@@ -1,4 +1,4 @@
$(document).ready(function() {
(function() {
var view;
@@ -14,19 +14,28 @@ $(document).ready(function() {
});
test("constructor", 6, function() {
test("constructor", 3, function() {
equal(view.el.id, 'test-view');
equal(view.el.className, 'test-view');
equal(view.el.other, void 0);
equal(view.options.id, 'test-view');
equal(view.options.className, 'test-view');
equal(view.options.other, 'non-special-option');
});
test("jQuery", 1, function() {
test("$", 2, function() {
var view = new Backbone.View;
view.setElement('<p><a><b>test</b></a></p>');
strictEqual(view.$('a b').html(), 'test');
var result = view.$('a b');
strictEqual(result[0].innerHTML, 'test');
ok(result.length === +result.length);
});
test("$el", 3, function() {
var view = new Backbone.View;
view.setElement('<p><a><b>test</b></a></p>');
strictEqual(view.el.nodeType, 1);
ok(view.$el instanceof Backbone.$);
strictEqual(view.$el[0], view.el);
});
test("initialize", 1, function() {
@@ -42,27 +51,38 @@ $(document).ready(function() {
test("delegateEvents", 6, function() {
var counter1 = 0, counter2 = 0;
var view = new Backbone.View({el: '<p><a id="test"></a></p>'});
var view = new Backbone.View({el: '#testElement'});
view.increment = function(){ counter1++; };
view.$el.on('click', function(){ counter2++; });
var events = {'click #test': 'increment'};
var events = {'click h1': 'increment'};
view.delegateEvents(events);
view.$('#test').trigger('click');
view.$('h1').trigger('click');
equal(counter1, 1);
equal(counter2, 1);
view.$('#test').trigger('click');
view.$('h1').trigger('click');
equal(counter1, 2);
equal(counter2, 2);
view.delegateEvents(events);
view.$('#test').trigger('click');
view.$('h1').trigger('click');
equal(counter1, 3);
equal(counter2, 3);
});
test("delegate", 2, function() {
var view = new Backbone.View({el: '#testElement'});
view.delegate('click', 'h1', function() {
ok(true);
});
view.delegate('click', function() {
ok(true);
});
view.$('h1').trigger('click');
});
test("delegateEvents allows functions for callbacks", 3, function() {
var view = new Backbone.View({el: '<p></p>'});
view.counter = 0;
@@ -95,28 +115,85 @@ $(document).ready(function() {
test("undelegateEvents", 6, function() {
var counter1 = 0, counter2 = 0;
var view = new Backbone.View({el: '<p><a id="test"></a></p>'});
var view = new Backbone.View({el: '#testElement'});
view.increment = function(){ counter1++; };
view.$el.on('click', function(){ counter2++; });
var events = {'click #test': 'increment'};
var events = {'click h1': 'increment'};
view.delegateEvents(events);
view.$('#test').trigger('click');
view.$('h1').trigger('click');
equal(counter1, 1);
equal(counter2, 1);
view.undelegateEvents();
view.$('#test').trigger('click');
view.$('h1').trigger('click');
equal(counter1, 1);
equal(counter2, 2);
view.delegateEvents(events);
view.$('#test').trigger('click');
view.$('h1').trigger('click');
equal(counter1, 2);
equal(counter2, 3);
});
test("undelegate", 0, function() {
view = new Backbone.View({el: '#testElement'});
view.delegate('click', function() { ok(false); });
view.delegate('click', 'h1', function() { ok(false); });
view.undelegate('click');
view.$('h1').trigger('click');
view.$el.trigger('click');
});
test("undelegate with passed handler", 1, function() {
view = new Backbone.View({el: '#testElement'});
var listener = function() { ok(false); };
view.delegate('click', listener);
view.delegate('click', function() { ok(true); });
view.undelegate('click', listener);
view.$el.trigger('click');
});
test("undelegate with selector", 2, function() {
view = new Backbone.View({el: '#testElement'});
view.delegate('click', function() { ok(true); });
view.delegate('click', 'h1', function() { ok(false); });
view.undelegate('click', 'h1');
view.$('h1').trigger('click');
view.$el.trigger('click');
});
test("undelegate with handler and selector", 2, function() {
view = new Backbone.View({el: '#testElement'});
view.delegate('click', function() { ok(true); });
var handler = function(){ ok(false); };
view.delegate('click', 'h1', handler);
view.undelegate('click', 'h1', handler);
view.$('h1').trigger('click');
view.$el.trigger('click');
});
test("tagName can be provided as a string", 1, function() {
var View = Backbone.View.extend({
tagName: 'span'
});
equal(new View().el.tagName, 'SPAN');
});
test("tagName can be provided as a function", 1, function() {
var View = Backbone.View.extend({
tagName: function() {
return 'p';
}
});
ok(new View().$el.is('p'));
});
test("_ensureElement with DOM node el", 1, function() {
var View = Backbone.View.extend({
el: document.body
@@ -156,30 +233,6 @@ $(document).ready(function() {
strictEqual(new View().el.id, 'id');
});
test("with options function", 3, function() {
var View1 = Backbone.View.extend({
options: function() {
return {
title: 'title1',
acceptText: 'confirm'
};
}
});
var View2 = View1.extend({
options: function() {
return _.extend(View1.prototype.options.call(this), {
title: 'title2',
fixed: true
});
}
});
strictEqual(new View2().options.title, 'title2');
strictEqual(new View2().options.acceptText, 'confirm');
strictEqual(new View2().options.fixed, true);
});
test("with attributes", 2, function() {
var View = Backbone.View.extend({
attributes: {
@@ -228,26 +281,19 @@ $(document).ready(function() {
equal(5, count);
});
test("custom events, with namespaces", 2, function() {
var count = 0;
test("custom events", 2, function() {
var View = Backbone.View.extend({
el: $('body'),
events: function() {
return {"fake$event.namespaced": "run"};
},
run: function() {
count++;
events: {
"fake$event": function() { ok(true); }
}
});
var view = new View;
$('body').trigger('fake$event').trigger('fake$event');
equal(count, 2);
$('body').unbind('.namespaced');
$('body').off('fake$event');
$('body').trigger('fake$event');
equal(count, 2);
});
test("#1048 - setElement uses provided object.", 2, function() {
@@ -291,21 +337,11 @@ $(document).ready(function() {
ok(!view2.el.id);
});
test("#1228 - tagName can be provided as a function", 1, function() {
var View = Backbone.View.extend({
tagName: function() {
return 'p';
}
});
ok(new View().$el.is('p'));
});
test("views stopListening", 0, function() {
var View = Backbone.View.extend({
initialize: function() {
this.listenTo(this.model, 'all x', function(){ ok(false); }, this);
this.listenTo(this.collection, 'all x', function(){ ok(false); }, this);
this.listenTo(this.model, 'all x', function(){ ok(false); });
this.listenTo(this.collection, 'all x', function(){ ok(false); });
}
});
@@ -319,7 +355,7 @@ $(document).ready(function() {
view.collection.trigger('x');
});
test("Provide function for el.", 1, function() {
test("Provide function for el.", 2, function() {
var View = Backbone.View.extend({
el: function() {
return "<p><a></a></p>";
@@ -327,31 +363,43 @@ $(document).ready(function() {
});
var view = new View;
ok(view.$el.is('p:has(a)'));
ok(view.$el.is('p'));
ok(view.$el.has('a'));
});
test("events passed in options", 2, function() {
test("events passed in options", 1, function() {
var counter = 0;
var View = Backbone.View.extend({
el: '<p><a id="test"></a></p>',
el: '#testElement',
increment: function() {
counter++;
}
});
var view = new View({events:{'click #test':'increment'}});
var view2 = new View({events:function(){
return {'click #test':'increment'};
}});
var view = new View({
events: {
'click h1': 'increment'
}
});
view.$('#test').trigger('click');
view2.$('#test').trigger('click');
view.$('h1').trigger('click').trigger('click');
equal(counter, 2);
view.$('#test').trigger('click');
view2.$('#test').trigger('click');
equal(counter, 4);
});
});
test("remove", 1, function() {
var view = new Backbone.View;
document.body.appendChild(view.el);
view.delegate('click', function() { ok(false); });
view.listenTo(view, 'all x', function() { ok(false); });
view.remove();
view.$el.trigger('click');
view.trigger('x');
// In IE8 and below, parentNode still exists but is not document.body.
notEqual(view.el.parentNode, document.body);
});
})();

View File

@@ -1,4 +1,4 @@
Copyright 2010-2013 Mathias Bynens <http://mathiasbynens.be/>
Copyright 2010-2015 Mathias Bynens <http://mathiasbynens.be/>
Based on JSLitmus.js, copyright Robert Kieffer <http://broofa.com/>
Modified by John-David Dalton <http://allyoucanleet.com/>
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,128 +0,0 @@
# Benchmark.js <sup>v1.0.0</sup>
[![build status](https://secure.travis-ci.org/bestiejs/benchmark.js.png)](http://travis-ci.org/bestiejs/benchmark.js)
A [robust](http://calendar.perfplanet.com/2010/bulletproof-javascript-benchmarks/ "Bulletproof JavaScript benchmarks") benchmarking library that works on nearly all JavaScript platforms<sup><a name="fnref1" href="#fn1">1</a></sup>, supports high-resolution timers, and returns statistically significant results. As seen on [jsPerf](http://jsperf.com/).
## Download
* [Development source](https://raw.github.com/bestiejs/benchmark.js/v1.0.0/benchmark.js)
## Dive in
Weve got [API docs](http://benchmarkjs.com/docs) and [unit tests](http://benchmarkjs.com/tests).
For a list of upcoming features, check out our [roadmap](https://github.com/bestiejs/benchmark.js/wiki/Roadmap).
## Support
Benchmark.js has been tested in at least Chrome 5~26, Firefox 1~19, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.10.4, Narwhal 0.3.2, PhantomJS 1.9.0, RingoJS 0.9, and Rhino 1.7RC5.
## Installation and usage
Benchmark.js only hard dependency is [Lo-Dash](http://lodash.com/).
In a browser:
```html
<script src="lodash.js"></script>
<script src="benchmark.js"></script>
```
Optionally, expose Javas nanosecond timer by adding the `nano` applet to the `<body>`:
```html
<applet code="nano" archive="nano.jar"></applet>
```
Or enable Chromes microsecond timer by using the [command line switch](http://peter.sh/experiments/chromium-command-line-switches/#enable-benchmarking):
--enable-benchmarking
Via [npm](http://npmjs.org/):
```bash
npm install benchmark
```
In [Node.js](http://nodejs.org/) and [RingoJS v0.8.0+](http://ringojs.org/):
```js
var Benchmark = require('benchmark');
```
Optionally, use the [microtime module](https://github.com/wadey/node-microtime) by Wade Simmons:
```bash
npm install microtime
```
In [RingoJS v0.7.0-](http://ringojs.org/):
```js
var Benchmark = require('benchmark').Benchmark;
```
In [Rhino](http://www.mozilla.org/rhino/):
```js
load('benchmark.js');
```
In an AMD loader like [RequireJS](http://requirejs.org/):
```js
require({
'paths': {
'benchmark': 'path/to/benchmark',
'lodash': 'path/to/lodash',
'platform': 'path/to/platform'
}
},
['benchmark'], function(Benchmark) {
console.log(Benchmark.platform.name);
});
```
Usage example:
```js
var suite = new Benchmark.Suite;
// add tests
suite.add('RegExp#test', function() {
/o/.test('Hello World!');
})
.add('String#indexOf', function() {
'Hello World!'.indexOf('o') > -1;
})
// add listeners
.on('cycle', function(event) {
console.log(String(event.target));
})
.on('complete', function() {
console.log('Fastest is ' + _.pluck(this.filter('fastest'), 'name'));
})
// run async
.run({ 'async': true });
// logs:
// > RegExp#test x 4,161,532 +-0.99% (59 cycles)
// > String#indexOf x 6,139,623 +-1.00% (131 cycles)
// > Fastest is String#indexOf
```
## BestieJS
Benchmark.js is part of the BestieJS *"Best in Class"* module collection. This means we promote solid browser/environment support, ES5+ precedents, unit testing, and plenty of documentation.
## Authors
* [Mathias Bynens](http://mathiasbynens.be/)
[![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter")
* [John-David Dalton](http://allyoucanleet.com/)
[![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter")
## Contributors
* [Kit Cambridge](http://kitcambridge.github.com/)
[![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter")

File diff suppressed because it is too large Load Diff

View File

@@ -1,20 +0,0 @@
Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,33 +0,0 @@
# Docdown <sup>v1.0.0</sup>
A simple JSDoc to Markdown documentation generator.
## Documentation
The documentation for Docdown can be viewed here: [/doc/README.md](https://github.com/jdalton/docdown/blob/master/doc/README.md#readme)
For a list of upcoming features, check out our [roadmap](https://github.com/jdalton/docdown/wiki/Roadmap).
## Installation and usage
Usage example:
```php
require("docdown.php");
// generate Markdown
$markdown = docdown(array(
"path" => $filepath,
"url" => "https://github.com/username/project/blob/master/my.js"
));
```
## Author
* [John-David Dalton](http://allyoucanleet.com/)
[![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter")
## Contributors
* [Mathias Bynens](http://mathiasbynens.be/)
[![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter")

View File

@@ -1,38 +0,0 @@
<?php
/*!
* Docdown v1.0.0-pre
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <http://mths.be/mit>
*/
require(dirname(__FILE__) . '/src/DocDown/Generator.php');
/**
* Generates Markdown from JSDoc entries in a given file.
*
* @param {Array} [$options=array()] The options array.
* @returns {String} The generated Markdown.
* @example
*
* // specify a file path
* $markdown = docdown(array(
* // path to js file
* 'path' => $filepath,
* // url used to reference line numbers in code
* 'url' => 'https://github.com/username/project/blob/master/my.js'
* ));
*
* // or pass raw js
* $markdown = docdown(array(
* // raw JavaScript source
* 'source' => $rawJS,
* // documentation title
* 'title' => 'My API Documentation',
* // url used to reference line numbers in code
* 'url' => 'https://github.com/username/project/blob/master/my.js'
* ));
*/
function docdown( $options = array() ) {
$gen = new Generator($options);
return $gen->generate();
}
?>

View File

@@ -1,226 +0,0 @@
<?php
/**
* A class to represent a JSDoc entry alias.
*/
class Alias {
/**
* The alias owner.
*
* @memberOf Alias
* @type Object
*/
public $owner;
/*--------------------------------------------------------------------------*/
/**
* The Alias constructor.
*
* @constructor
* @param {String} $name The alias name.
* @param {Object} $owner The alias owner.
*/
public function __construct( $name, $owner ) {
$this->owner = $owner;
$this->_name = $name;
$this->_call = $owner->getCall();
$this->_category = $owner->getCategory();
$this->_desc = $owner->getDesc();
$this->_example = $owner->getExample();
$this->_isCtor = $owner->isCtor();
$this->_isLicense = $owner->isLicense();
$this->_isPlugin = $owner->isPlugin();
$this->_isPrivate = $owner->isPrivate();
$this->_isStatic = $owner->isStatic();
$this->_lineNumber = $owner->getLineNumber();
$this->_members = $owner->getMembers();
$this->_params = $owner->getParams();
$this->_returns = $owner->getReturns();
$this->_type = $owner->getType();
}
/*--------------------------------------------------------------------------*/
/**
* Extracts the entry's `alias` objects.
*
* @memberOf Alias
* @param {Number} $index The index of the array value to return.
* @returns {Array|String} The entry's `alias` objects.
*/
public function getAliases( $index = null ) {
$result = array();
return $index !== null
? @$result[$index]
: $result;
}
/**
* Extracts the function call from the owner entry.
*
* @memberOf Alias
* @returns {String} The function call.
*/
public function getCall() {
return $this->_call;
}
/**
* Extracts the owner entry's `category` data.
*
* @memberOf Alias
* @returns {String} The owner entry's `category` data.
*/
public function getCategory() {
return $this->_category;
}
/**
* Extracts the owner entry's description.
*
* @memberOf Alias
* @returns {String} The owner entry's description.
*/
public function getDesc() {
return $this->_desc;
}
/**
* Extracts the owner entry's `example` data.
*
* @memberOf Alias
* @returns {String} The owner entry's `example` data.
*/
public function getExample() {
return $this->_example;
}
/**
* Checks if the entry is an alias.
*
* @memberOf Alias
* @returns {Boolean} Returns `true`.
*/
public function isAlias() {
return true;
}
/**
* Checks if the owner entry is a constructor.
*
* @memberOf Alias
* @returns {Boolean} Returns `true` if a constructor, else `false`.
*/
public function isCtor() {
return $this->_isCtor;
}
/**
* Checks if the owner entry is a license.
*
* @memberOf Alias
* @returns {Boolean} Returns `true` if a license, else `false`.
*/
public function isLicense() {
return $this->_isLicense;
}
/**
* Checks if the owner entry *is* assigned to a prototype.
*
* @memberOf Alias
* @returns {Boolean} Returns `true` if assigned to a prototype, else `false`.
*/
public function isPlugin() {
return $this->_isPlugin;
}
/**
* Checks if the owner entry is private.
*
* @memberOf Alias
* @returns {Boolean} Returns `true` if private, else `false`.
*/
public function isPrivate() {
return $this->_isPrivate;
}
/**
* Checks if the owner entry is *not* assigned to a prototype.
*
* @memberOf Alias
* @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`.
*/
public function isStatic() {
return $this->_isStatic;
}
/**
* Resolves the owner entry's line number.
*
* @memberOf Alias
* @returns {Number} The owner entry's line number.
*/
public function getLineNumber() {
return $this->_lineNumber;
}
/**
* Extracts the owner entry's `member` data.
*
* @memberOf Alias
* @param {Number} $index The index of the array value to return.
* @returns {Array|String} The owner entry's `member` data.
*/
public function getMembers( $index = null ) {
return $index !== null
? @$this->_members[$index]
: $this->_members;
}
/**
* Extracts the owner entry's `name` data.
*
* @memberOf Alias
* @returns {String} The owner entry's `name` data.
*/
public function getName() {
return $this->_name;
}
/**
* Extracts the owner entry's `param` data.
*
* @memberOf Alias
* @param {Number} $index The index of the array value to return.
* @returns {Array} The owner entry's `param` data.
*/
public function getParams( $index = null ) {
return $index !== null
? @$this->_params[$index]
: $this->_params;
}
/**
* Extracts the owner entry's `returns` data.
*
* @memberOf Alias
* @returns {String} The owner entry's `returns` data.
*/
public function getReturns() {
return $this->_returns;
}
/**
* Extracts the owner entry's `type` data.
*
* @memberOf Alias
* @returns {String} The owner entry's `type` data.
*/
public function getType() {
return $this->_type;
}
}
?>

View File

@@ -1,442 +0,0 @@
<?php
require(dirname(__FILE__) . "/Alias.php");
/**
* A class to simplify parsing a single JSDoc entry.
*/
class Entry {
/**
* The documentation entry.
*
* @memberOf Entry
* @type String
*/
public $entry = '';
/**
* The language highlighter used for code examples.
*
* @memberOf Entry
* @type String
*/
public $lang = '';
/**
* The source code.
*
* @memberOf Entry
* @type String
*/
public $source = '';
/*--------------------------------------------------------------------------*/
/**
* The Entry constructor.
*
* @constructor
* @param {String} $entry The documentation entry to analyse.
* @param {String} $source The source code.
* @param {String} [$lang ='js'] The language highlighter used for code examples.
*/
public function __construct( $entry, $source, $lang = 'js' ) {
$this->entry = $entry;
$this->lang = $lang;
$this->source = str_replace(PHP_EOL, "\n", $source);
}
/*--------------------------------------------------------------------------*/
/**
* Extracts the documentation entries from source code.
*
* @static
* @memberOf Entry
* @param {String} $source The source code.
* @returns {Array} The array of entries.
*/
public static function getEntries( $source ) {
preg_match_all('#/\*\*(?![-!])[\s\S]*?\*/\s*[^\n]+#', $source, $result);
return array_pop($result);
}
/*--------------------------------------------------------------------------*/
/**
* Checks if the entry is a function reference.
*
* @private
* @memberOf Entry
* @returns {Boolean} Returns `true` if the entry is a function reference, else `false`.
*/
private function isFunction() {
if (!isset($this->_isFunction)) {
$this->_isFunction = !!(
$this->isCtor() ||
count($this->getParams()) ||
count($this->getReturns()) ||
preg_match('/\* *@function\b/', $this->entry)
);
}
return $this->_isFunction;
}
/*--------------------------------------------------------------------------*/
/**
* Extracts the entry's `alias` objects.
*
* @memberOf Entry
* @param {Number} $index The index of the array value to return.
* @returns {Array|String} The entry's `alias` objects.
*/
public function getAliases( $index = null ) {
if (!isset($this->_aliases)) {
preg_match('#\* *@alias\s+([^\n]+)#', $this->entry, $result);
if (count($result)) {
$result = trim(preg_replace('/(?:^|\n)\s*\* ?/', ' ', $result[1]));
$result = preg_split('/,\s*/', $result);
natsort($result);
foreach ($result as $resultIndex => $value) {
$result[$resultIndex] = new Alias($value, $this);
}
}
$this->_aliases = $result;
}
return $index !== null
? @$this->_aliases[$index]
: $this->_aliases;
}
/**
* Extracts the function call from the entry.
*
* @memberOf Entry
* @returns {String} The function call.
*/
public function getCall() {
if (isset($this->_call)) {
return $this->_call;
}
preg_match('#\*/\s*(?:function ([^(]*)|(.*?)(?=[:=,]|return\b))#', $this->entry, $result);
if ($result = array_pop($result)) {
$result = array_pop(explode('var ', trim(trim(array_pop(explode('.', $result))), "'")));
}
// resolve name
// avoid $this->getName() because it calls $this->getCall()
preg_match('#\* *@name\s+([^\n]+)#', $this->entry, $name);
if (count($name)) {
$name = trim($name[1]);
} else {
$name = $result;
}
// compile function call syntax
if ($this->isFunction()) {
// compose parts
$result = array($result);
$params = $this->getParams();
foreach ($params as $param) {
$result[] = $param[1];
}
// format
$result = $name .'('. implode(array_slice($result, 1), ', ') .')';
$result = str_replace(', [', ' [, ', str_replace('], [', ', ', $result));
}
$this->_call = $result ? $result : $name;
return $this->_call;
}
/**
* Extracts the entry's `category` data.
*
* @memberOf Entry
* @returns {String} The entry's `category` data.
*/
public function getCategory() {
if (isset($this->_category)) {
return $this->_category;
}
preg_match('#\* *@category\s+([^\n]+)#', $this->entry, $result);
if (count($result)) {
$result = trim(preg_replace('/(?:^|\n)\s*\* ?/', ' ', $result[1]));
} else {
$result = $this->getType() == 'Function' ? 'Methods' : 'Properties';
}
$this->_category = $result;
return $result;
}
/**
* Extracts the entry's description.
*
* @memberOf Entry
* @returns {String} The entry's description.
*/
public function getDesc() {
if (isset($this->_desc)) {
return $this->_desc;
}
preg_match('#/\*\*(?:\s*\*)?([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result);
if (count($result)) {
$type = $this->getType();
$result = preg_replace('/:\n *\* */', ":<br>\n", $result[1]);
$result = preg_replace('/(?:^|\n) *\*\n *\* */', "\n\n", $result);
$result = preg_replace('/(?:^|\n) *\* ?/', ' ', $result);
$result = trim($result);
$result = ($type == 'Function' ? '' : '(' . str_replace('|', ', ', trim($type, '{}')) . '): ') . $result;
}
$this->_desc = $result;
return $result;
}
/**
* Extracts the entry's `example` data.
*
* @memberOf Entry
* @returns {String} The entry's `example` data.
*/
public function getExample() {
if (isset($this->_example)) {
return $this->_example;
}
preg_match('#\* *@example\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result);
if (count($result)) {
$result = trim(preg_replace('/(?:^|\n)\s*\* ?/', "\n", $result[1]));
$result = '```' . $this->lang . "\n" . $result . "\n```";
}
$this->_example = $result;
return $result;
}
/**
* Checks if the entry is an alias.
*
* @memberOf Entry
* @returns {Boolean} Returns `false`.
*/
public function isAlias() {
return false;
}
/**
* Checks if the entry is a constructor.
*
* @memberOf Entry
* @returns {Boolean} Returns `true` if a constructor, else `false`.
*/
public function isCtor() {
if (!isset($this->_isCtor)) {
$this->_isCtor = !!preg_match('/\* *@constructor\b/', $this->entry);
}
return $this->_isCtor;
}
/**
* Checks if the entry is a license.
*
* @memberOf Entry
* @returns {Boolean} Returns `true` if a license, else `false`.
*/
public function isLicense() {
if (!isset($this->_isLicense)) {
$this->_isLicense = !!preg_match('/\* *@license\b/', $this->entry);
}
return $this->_isLicense;
}
/**
* Checks if the entry *is* assigned to a prototype.
*
* @memberOf Entry
* @returns {Boolean} Returns `true` if assigned to a prototype, else `false`.
*/
public function isPlugin() {
if (!isset($this->_isPlugin)) {
$this->_isPlugin = !$this->isCtor() && !$this->isPrivate() && !$this->isStatic();
}
return $this->_isPlugin;
}
/**
* Checks if the entry is private.
*
* @memberOf Entry
* @returns {Boolean} Returns `true` if private, else `false`.
*/
public function isPrivate() {
if (!isset($this->_isPrivate)) {
$this->_isPrivate = $this->isLicense() || !!preg_match('/\* *@private\b/', $this->entry) || !preg_match('/\* *@[a-z]+\b/', $this->entry);
}
return $this->_isPrivate;
}
/**
* Checks if the entry is *not* assigned to a prototype.
*
* @memberOf Entry
* @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`.
*/
public function isStatic() {
if (isset($this->_isStatic)) {
return $this->_isStatic;
}
$public = !$this->isPrivate();
$result = $public && !!preg_match('/\* *@static\b/', $this->entry);
// set in cases where it isn't explicitly stated
if ($public && !$result) {
if ($parent = array_pop(preg_split('/[#.]/', $this->getMembers(0)))) {
foreach (Entry::getEntries($this->source) as $entry) {
$entry = new Entry($entry, $this->source);
if ($entry->getName() == $parent) {
$result = !$entry->isCtor();
break;
}
}
} else {
$result = true;
}
}
$this->_isStatic = $result;
return $result;
}
/**
* Resolves the entry's line number.
*
* @memberOf Entry
* @returns {Number} The entry's line number.
*/
public function getLineNumber() {
if (!isset($this->_lineNumber)) {
preg_match_all('/\n/', substr($this->source, 0, strrpos($this->source, $this->entry) + strlen($this->entry)), $lines);
$this->_lineNumber = count(array_pop($lines)) + 1;
}
return $this->_lineNumber;
}
/**
* Extracts the entry's `member` data.
*
* @memberOf Entry
* @param {Number} $index The index of the array value to return.
* @returns {Array|String} The entry's `member` data.
*/
public function getMembers( $index = null ) {
if (!isset($this->_members)) {
preg_match('#\* *@member(?:Of)?\s+([^\n]+)#', $this->entry, $result);
if (count($result)) {
$result = trim(preg_replace('/(?:^|\n)\s*\* ?/', ' ', $result[1]));
$result = preg_split('/,\s*/', $result);
natsort($result);
}
$this->_members = $result;
}
return $index !== null
? @$this->_members[$index]
: $this->_members;
}
/**
* Extracts the entry's `name` data.
*
* @memberOf Entry
* @returns {String} The entry's `name` data.
*/
public function getName() {
if (isset($this->_name)) {
return $this->_name;
}
preg_match('#\* *@name\s+([^\n]+)#', $this->entry, $result);
if (count($result)) {
$result = trim(preg_replace('/(?:^|\n)\s*\* ?/', ' ', $result[1]));
} else {
$result = array_shift(explode('(', $this->getCall()));
}
$this->_name = $result;
return $result;
}
/**
* Extracts the entry's `param` data.
*
* @memberOf Entry
* @param {Number} $index The index of the array value to return.
* @returns {Array} The entry's `param` data.
*/
public function getParams( $index = null ) {
if (!isset($this->_params)) {
preg_match_all('#\* *@param\s+\{([^}]+)\}\s+(\[.+\]|[$\w|]+(?:\[.+\])?)\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#i', $this->entry, $result);
if (count($result = array_filter(array_slice($result, 1)))) {
// repurpose array
foreach ($result as $param) {
foreach ($param as $key => $value) {
if (!is_array($result[0][$key])) {
$result[0][$key] = array();
}
$result[0][$key][] = trim(preg_replace('/(?:^|\n)\s*\* */', ' ', $value));
}
}
$result = $result[0];
}
$this->_params = $result;
}
return $index !== null
? @$this->_params[$index]
: $this->_params;
}
/**
* Extracts the entry's `returns` data.
*
* @memberOf Entry
* @returns {String} The entry's `returns` data.
*/
public function getReturns() {
if (isset($this->_returns)) {
return $this->_returns;
}
preg_match('#\* *@returns\s+\{([^}]+)\}\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result);
if (count($result)) {
$result = array_map('trim', array_slice($result, 1));
$result[0] = str_replace('|', ', ', $result[0]);
$result[1] = preg_replace('/(?:^|\n)\s*\* ?/', ' ', $result[1]);
}
$this->_returns = $result;
return $result;
}
/**
* Extracts the entry's `type` data.
*
* @memberOf Entry
* @returns {String} The entry's `type` data.
*/
public function getType() {
if (isset($this->_type)) {
return $this->_type;
}
preg_match('#\* *@type\s+([^\n]+)#', $this->entry, $result);
if (count($result)) {
$result = trim(preg_replace('/(?:^|\n)\s*\* ?/', ' ', $result[1]));
} else {
$result = $this->isFunction() ? 'Function' : 'Unknown';
}
$this->_type = $result;
return $result;
}
}
?>

View File

@@ -1,565 +0,0 @@
<?php
require(dirname(__FILE__) . "/Entry.php");
/**
* Generates Markdown from JSDoc entries.
*/
class Generator {
/**
* The HTML for the close tag.
*
* @static
* @memberOf Generator
* @type String
*/
public $closeTag = "\n<!-- /div -->\n";
/**
* An array of JSDoc entries.
*
* @memberOf Generator
* @type Array
*/
public $entries = array();
/**
* The HTML for the open tag.
*
* @static
* @memberOf Generator
* @type String
*/
public $openTag = "\n<!-- div -->\n";
/**
* An options array used to configure the generator.
*
* @memberOf Generator
* @type Array
*/
public $options = array();
/**
* The file's source code.
*
* @memberOf Generator
* @type String
*/
public $source = '';
/*--------------------------------------------------------------------------*/
/**
* The Generator constructor.
*
* @constructor
* @param {String} $source The source code to parse.
* @param {Array} $options The options array.
*/
public function __construct( $source, $options = array() ) {
// juggle arguments
if (is_array($source)) {
$options = $source;
} else {
$options['source'] = $source;
}
if (isset($options['source']) && realpath($options['source'])) {
$options['path'] = $options['source'];
}
if (isset($options['path'])) {
preg_match('/(?<=\.)[a-z]+$/', $options['path'], $ext);
$options['source'] = file_get_contents($options['path']);
$ext = array_pop($ext);
if (!isset($options['lang']) && $ext) {
$options['lang'] = $ext;
}
if (!isset($options['title'])) {
$options['title'] = ucfirst(basename($options['path'])) . ' API documentation';
}
}
if (!isset($options['lang'])) {
$options['lang'] = 'js';
}
if (!isset($options['toc'])) {
$options['toc'] = 'properties';
}
$this->options = $options;
$this->source = str_replace(PHP_EOL, "\n", $options['source']);
$this->entries = Entry::getEntries($this->source);
foreach ($this->entries as $index => $value) {
$this->entries[$index] = new Entry($value, $this->source, $options['lang']);
}
}
/*--------------------------------------------------------------------------*/
/**
* Performs common string formatting operations.
*
* @private
* @static
* @memberOf Generator
* @param {String} $string The string to format.
* @returns {String} The formatted string.
*/
private static function format( $string ) {
$counter = 0;
// tokenize inline code snippets
preg_match_all('/`[^`]+`/', $string, $tokenized);
$tokenized = $tokenized[0];
foreach ($tokenized as $snippet) {
$string = str_replace($snippet, '__token' . ($counter++) .'__', $string);
}
// italicize parentheses
$string = preg_replace('/(^|\s)(\([^)]+\))/', '$1*$2*', $string);
// mark numbers as inline code
$string = preg_replace('/ (-?\d+(?:.\d+)?)(?!\.[^\n])/', ' `$1`', $string);
// detokenize inline code snippets
$counter = 0;
foreach ($tokenized as $snippet) {
$string = str_replace('__token' . ($counter++) . '__', $snippet, $string);
}
return trim($string);
}
/**
* Modify a string by replacing named tokens with matching assoc. array values.
*
* @private
* @static
* @memberOf Generator
* @param {String} $string The string to modify.
* @param {Array|Object} $object The template object.
* @returns {String} The modified string.
*/
private static function interpolate( $string, $object ) {
preg_match_all('/#\{([^}]+)\}/', $string, $tokens);
$tokens = array_unique(array_pop($tokens));
foreach ($tokens as $token) {
$pattern = '/#\{' . $token . '\}/';
$replacement = '';
if (is_object($object)) {
preg_match('/\(([^)]+?)\)$/', $token, $args);
$args = preg_split('/,\s*/', array_pop($args));
$method = 'get' . ucfirst(str_replace('/\([^)]+?\)$/', '', $token));
if (method_exists($object, $method)) {
$replacement = (string) call_user_func_array(array($object, $method), $args);
} else if (isset($object->{$token})) {
$replacement = (string) $object->{$token};
}
} else if (isset($object[$token])) {
$replacement = (string) $object[$token];
}
$string = preg_replace($pattern, trim($replacement), $string);
}
return Generator::format($string);
}
/*--------------------------------------------------------------------------*/
/**
* Adds the given `$entries` to the `$result` array.
*
* @private
* @memberOf Generator
* @param {Array} $result The result array to modify.
* @param {Array} $entries The entries to add to the `$result`.
*/
private function addEntries( &$result, $entries ) {
foreach ($entries as $entry) {
// skip aliases
if ($entry->isAlias()) {
continue;
}
// name and description
array_push(
$result,
$this->openTag,
Generator::interpolate("### <a id=\"#{hash}\"></a>`#{member}#{separator}#{call}`\n<a href=\"##{hash}\">#</a> [&#x24C8;](#{href} \"View in source\") [&#x24C9;][1]\n\n#{desc}", $entry)
);
// @alias
if (count($aliases = $entry->getAliases())) {
array_push($result, '', '#### Aliases');
foreach ($aliases as $index => $alias) {
$aliases[$index] = $alias->getName();
}
$result[] = '*' . implode(', ', $aliases) . '*';
}
// @param
if (count($params = $entry->getParams())) {
array_push($result, '', '#### Arguments');
foreach ($params as $index => $param) {
$result[] = Generator::interpolate('#{num}. `#{name}` (#{type}): #{desc}', array(
'desc' => $param[2],
'name' => $param[1],
'num' => $index + 1,
'type' => $param[0]
));
}
}
// @returns
if (count($returns = $entry->getReturns())) {
array_push(
$result, '',
'#### Returns',
Generator::interpolate('(#{type}): #{desc}', array('desc' => $returns[1], 'type' => $returns[0]))
);
}
// @example
if ($example = $entry->getExample()) {
array_push($result, '', '#### Example', $example);
}
array_push($result, "\n* * *", $this->closeTag);
}
}
/**
* Resolves the entry's hash used to navigate the documentation.
*
* @private
* @memberOf Generator
* @param {Number|Object} $entry The entry object.
* @param {String} $member The name of the member.
* @returns {String} The url hash.
*/
private function getHash( $entry, $member = '' ) {
$entry = is_numeric($entry) ? $this->entries[$entry] : $entry;
$member = !$member ? $entry->getMembers(0) : $member;
$result = ($member ? $member . ($entry->isPlugin() ? 'prototype' : '') : '') . $entry->getCall();
$result = preg_replace('/\(\[|\[\]/', '', $result);
$result = preg_replace('/[ =|\'"{}.()\]]/', '', $result);
$result = preg_replace('/[[#,]/', '-', $result);
return strtolower($result);
}
/**
* Resolves the entry's url for the specific line number.
*
* @private
* @memberOf Generator
* @param {Number|Object} $entry The entry object.
* @returns {String} The url.
*/
private function getLineUrl( $entry ) {
$entry = is_numeric($entry) ? $this->entries($entry) : $entry;
return $this->options['url'] . '#L' . $entry->getLineNumber();
}
/**
* Extracts the character used to separate the entry's name from its member.
*
* @private
* @memberOf Generator
* @param {Number|Object} $entry The entry object.
* @returns {String} The separator.
*/
private function getSeparator( $entry ) {
$entry = is_numeric($entry) ? $this->entries($entry) : $entry;
return $entry->isPlugin() ? '.prototype.' : '.';
}
/*--------------------------------------------------------------------------*/
/**
* Generates Markdown from JSDoc entries.
*
* @memberOf Generator
* @returns {String} The rendered Markdown.
*/
public function generate() {
$api = array();
$byCategory = $this->options['toc'] == 'categories';
$categories = array();
$closeTag = $this->closeTag;
$compiling = false;
$openTag = $this->openTag;
$result = array('# ' . $this->options['title']);
$toc = 'toc';
// initialize $api array
foreach ($this->entries as $entry) {
// skip invalid or private entries
$name = $entry->getName();
if (!$name || $entry->isPrivate()) {
continue;
}
$members = $entry->getMembers();
$members = count($members) ? $members : array('');
foreach ($members as $member) {
// create api category arrays
if ($member && !isset($api[$member])) {
// create temporary entry to be replaced later
$api[$member] = new stdClass;
$api[$member]->static = array();
$api[$member]->plugin = array();
}
// append entry to api member
if (!$member || $entry->isCtor() || ($entry->getType() == 'Object' &&
!preg_match('/[=:]\s*(?:null|undefined)\s*[,;]?$/', $entry->entry))) {
// assign the real entry, replacing the temporary entry if it exist
$member = ($member ? $member . ($entry->isPlugin() ? '#' : '.') : '') . $name;
$entry->static = @$api[$member] ? $api[$member]->static : array();
$entry->plugin = @$api[$member] ? $api[$member]->plugin : array();
$api[$member] = $entry;
foreach ($entry->getAliases() as $alias) {
$api[$member] = $alias;
$alias->static = array();
$alias->plugin = array();
}
}
else if ($entry->isStatic()) {
$api[$member]->static[] = $entry;
foreach ($entry->getAliases() as $alias) {
$api[$member]->static[] = $alias;
}
}
else if (!$entry->isCtor()) {
$api[$member]->plugin[] = $entry;
foreach ($entry->getAliases() as $alias) {
$api[$member]->plugin[] = $alias;
}
}
}
}
// add properties to each entry
foreach ($api as $entry) {
$entry->hash = $this->getHash($entry);
$entry->href = $this->getLineUrl($entry);
$member = $entry->getMembers(0);
$member = ($member ? $member . ($entry->isPlugin() ? '.prototype.' : '.') : '') . $entry->getName();
$entry->member = preg_replace('/' . $entry->getName() . '$/', '', $member);
// add properties to static and plugin sub-entries
foreach (array('static', 'plugin') as $kind) {
foreach ($entry->{$kind} as $subentry) {
$subentry->hash = $this->getHash($subentry);
$subentry->href = $this->getLineUrl($subentry);
$subentry->member = $member;
$subentry->separator = $this->getSeparator($subentry);
}
}
}
/*------------------------------------------------------------------------*/
// custom sort for root level entries
// TODO: see how well it handles deeper namespace traversal
function sortCompare($a, $b) {
$score = array( 'a' => 0, 'b' => 0);
foreach (array( 'a' => $a, 'b' => $b) as $key => $value) {
// capitalized properties are last
if (preg_match('/[#.][A-Z]/', $value)) {
$score[$key] = 0;
}
// lowercase prototype properties are next to last
else if (preg_match('/#[a-z]/', $value)) {
$score[$key] = 1;
}
// lowercase static properties next to first
else if (preg_match('/\.[a-z]/', $value)) {
$score[$key] = 2;
}
// root properties are first
else if (preg_match('/^[^#.]+$/', $value)) {
$score[$key] = 3;
}
}
$score = $score['b'] - $score['a'];
return $score ? $score : strcasecmp($a, $b);
}
uksort($api, 'sortCompare');
// sort static and plugin sub-entries
foreach ($api as $entry) {
foreach (array('static', 'plugin') as $kind) {
$sortBy = array( 'a' => array(), 'b' => array(), 'c' => array() );
foreach ($entry->{$kind} as $subentry) {
$name = $subentry->getName();
// functions w/o ALL-CAPs names are last
$sortBy['a'][] = $subentry->getType() == 'Function' && !preg_match('/^[A-Z_]+$/', $name);
// ALL-CAPs properties first
$sortBy['b'][] = preg_match('/^[A-Z_]+$/', $name);
// lowercase alphanumeric sort
$sortBy['c'][] = strtolower($name);
}
array_multisort($sortBy['a'], SORT_ASC, $sortBy['b'], SORT_DESC, $sortBy['c'], SORT_ASC, $entry->{$kind});
}
}
/*------------------------------------------------------------------------*/
// add categories
foreach ($api as $entry) {
$categories[$entry->getCategory()][] = $entry;
foreach (array('static', 'plugin') as $kind) {
foreach ($entry->{$kind} as $subentry) {
$categories[$subentry->getCategory()][] = $subentry;
}
}
}
// sort categories
ksort($categories);
foreach(array('Methods', 'Properties') as $category) {
if (isset($categories[$category])) {
$entries = $categories[$category];
unset($categories[$category]);
$categories[$category] = $entries;
}
}
/*------------------------------------------------------------------------*/
// compile TOC
$result[] = $openTag;
// compile TOC by categories
if ($byCategory) {
foreach ($categories as $category => $entries) {
if ($compiling) {
$result[] = $closeTag;
} else {
$compiling = true;
}
// assign TOC hash
if (count($result) == 2) {
$toc = $category;
}
// add category
array_push(
$result,
$openTag, '## ' . (count($result) == 2 ? '<a id="' . $toc . '"></a>' : '') . '`' . $category . '`'
);
// add entries
foreach ($entries as $entry) {
$result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $entry);
}
}
}
// compile TOC by namespace
else {
foreach ($api as $entry) {
if ($compiling) {
$result[] = $closeTag;
} else {
$compiling = true;
}
$member = $entry->member . $entry->getName();
// assign TOC hash
if (count($result) == 2) {
$toc = $member;
}
// add root entry
array_push(
$result,
$openTag, '## ' . (count($result) == 2 ? '<a id="' . $toc . '"></a>' : '') . '`' . $member . '`',
Generator::interpolate('* [`' . $member . '`](##{hash})', $entry)
);
// add static and plugin sub-entries
foreach (array('static', 'plugin') as $kind) {
if ($kind == 'plugin' && count($entry->plugin)) {
array_push(
$result,
$closeTag,
$openTag,
'## `' . $member . ($entry->isCtor() ? '.prototype`' : '`')
);
}
foreach ($entry->{$kind} as $subentry) {
$subentry->member = $member;
$result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $subentry);
}
}
}
}
array_push($result, $closeTag, $closeTag);
/*------------------------------------------------------------------------*/
// compile content
$compiling = false;
$result[] = $openTag;
if ($byCategory) {
foreach ($categories as $category => $entries) {
if ($compiling) {
$result[] = $closeTag;
} else {
$compiling = true;
}
if ($category != 'Methods' && $category != 'Properties') {
$category = '“' . $category . '” Methods';
}
array_push($result, $openTag, '## `' . $category . '`');
$this->addEntries($result, $entries);
}
}
else {
foreach ($api as $entry) {
// skip aliases
if ($entry->isAlias()) {
continue;
}
if ($compiling) {
$result[] = $closeTag;
} else {
$compiling = true;
}
// add root entry name
$member = $entry->member . $entry->getName();
array_push($result, $openTag, '## `' . $member . '`');
foreach (array($entry, 'static', 'plugin') as $kind) {
$subentries = is_string($kind) ? $entry->{$kind} : array($kind);
// add sub-entry name
if ($kind != 'static' && $entry->getType() != 'Object' &&
count($subentries) && $subentries[0] != $kind) {
if ($kind == 'plugin') {
$result[] = $closeTag;
}
array_push(
$result,
$openTag,
'## `' . $member . ($kind == 'plugin' ? '.prototype`' : '`')
);
}
$this->addEntries($result, $subentries);
}
}
}
// close tags add TOC link reference
array_push($result, $closeTag, $closeTag, '', ' [1]: #' . $toc . ' "Jump back to the TOC."');
// cleanup whitespace
return trim(preg_replace('/ +\n/', "\n", join($result, "\n")));
}
}
?>

0
vendor/firebug-lite/license.txt vendored Executable file → Normal file
View File

0
vendor/firebug-lite/skin/xp/blank.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

0
vendor/firebug-lite/skin/xp/buttonBg.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

0
vendor/firebug-lite/skin/xp/buttonBgHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 171 B

0
vendor/firebug-lite/skin/xp/debugger.css vendored Executable file → Normal file
View File

0
vendor/firebug-lite/skin/xp/detach.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 655 B

After

Width:  |  Height:  |  Size: 655 B

0
vendor/firebug-lite/skin/xp/detachHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 586 B

0
vendor/firebug-lite/skin/xp/disable.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 340 B

0
vendor/firebug-lite/skin/xp/disable.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 543 B

0
vendor/firebug-lite/skin/xp/disableHover.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 344 B

0
vendor/firebug-lite/skin/xp/disableHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 512 B

After

Width:  |  Height:  |  Size: 512 B

0
vendor/firebug-lite/skin/xp/down.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 637 B

After

Width:  |  Height:  |  Size: 637 B

0
vendor/firebug-lite/skin/xp/downActive.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 543 B

0
vendor/firebug-lite/skin/xp/downHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 526 B

0
vendor/firebug-lite/skin/xp/errorIcon-sm.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 447 B

After

Width:  |  Height:  |  Size: 447 B

0
vendor/firebug-lite/skin/xp/errorIcon.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 365 B

0
vendor/firebug-lite/skin/xp/errorIcon.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 457 B

28
vendor/firebug-lite/skin/xp/firebug-1.3a2.css vendored Executable file → Normal file
View File

@@ -70,7 +70,7 @@ html, body {
body {
font-family: Lucida Grande, Tahoma, sans-serif;
font-size: 11px;
background: #fff;
background: #fff;
}
.clear {
@@ -103,7 +103,7 @@ body {
border: 1px solid #ccc;
margin: 0 5px 0 0;
background: #fff url(search.png) no-repeat 4px 2px;
padding-left: 20px;
padding-left: 20px;
font-size: 11px;
}
@@ -124,7 +124,7 @@ body {
height: 14px;
background: url(errorIcon.png) no-repeat;
color: #f00;
font-weight: bold;
font-weight: bold;
}
#fbMiniErrors {
@@ -139,7 +139,7 @@ body {
margin: 3px 4px 0;
height: 20px;
width: 20px;
float: right;
float: right;
background: url(sprite.png) 0 -135px;
cursor: pointer;
}
@@ -192,10 +192,10 @@ body {
}
/************************************************************************************************
Sub-Layout
Sub-Layout
*************************************************************************************************/
/* fbToolbar
/* fbToolbar
*************************************************************************************************/
#fbToolbarIcon {
float: left;
@@ -237,7 +237,7 @@ body {
position: relative;
top: 5px;
line-height: 19px;
cursor: default;
cursor: default;
}
.fbToolbarSeparator{
@@ -262,7 +262,7 @@ body {
.fbStatusBar span a:hover {
color: blue;
cursor: pointer;
cursor: pointer;
}
@@ -307,7 +307,7 @@ body {
padding-left: 10px;
}
/* body
/* body
*************************************************************************************************/
.fbPanel {
display: none;
@@ -340,7 +340,7 @@ body {
visibility: hidden !important;
}
/* fbBottom
/* fbBottom
*************************************************************************************************/
#fbCommand {
@@ -391,7 +391,7 @@ div.fbFitHeight {
Layout Controls
*************************************************************************************************/
/* fbToolbar buttons
/* fbToolbar buttons
*************************************************************************************************/
#fbWindowButtons a {
font-size: 1px;
@@ -420,7 +420,7 @@ div.fbFitHeight {
background: url(sprite.png) -48px -119px;
}
/* fbPanelBarBox tabs
/* fbPanelBarBox tabs
*************************************************************************************************/
.fbTab {
text-decoration: none;
@@ -475,7 +475,7 @@ a.fbTab:hover .fbTabR {
background: url(sprite.png) -8px -96px !important;
}
/* splitters
/* splitters
*************************************************************************************************/
#fbHSplitter {
position: absolute;
@@ -571,7 +571,7 @@ div.objectBox-element {
color: #fff !important;
}
/* Webkit CSS Hack - bug in "highlight" named color */
/* Webkit CSS Hack - bug in "highlight" named color */
@media screen and (-webkit-min-device-pixel-ratio:0) {
.selectedElement{
background: #316AC5;

0
vendor/firebug-lite/skin/xp/firebug.IE6.css vendored Executable file → Normal file
View File

68
vendor/firebug-lite/skin/xp/firebug.css vendored Executable file → Normal file
View File

@@ -136,10 +136,10 @@ h1.groupHeader {
position: relative;
top: -7px;
left: -5px;
outline: none;
resize: none;
/*
_border: 1px solid #999 !important;
_padding: 1px !important;
@@ -311,17 +311,17 @@ h1.groupHeader {
outline: none;
background-color: transparent
}
.useA11y .a11yCSSView .focusRow:focus .cssSelector,
.useA11y .a11yCSSView .focusRow:focus .cssPropName,
.useA11y .a11yCSSView .focusRow:focus .cssSelector,
.useA11y .a11yCSSView .focusRow:focus .cssPropName,
.useA11y .a11yCSSView .focusRow:focus .cssPropValue,
.useA11y .a11yCSSView .computedStyleRow:focus,
.useA11y .a11yCSSView .computedStyleRow:focus,
.useA11y .a11yCSSView .groupHeader:focus {
outline: 2px solid #FF9933;
outline-offset: -2px;
background-color: #FFFFD6;
}
.useA11y .a11yCSSView .groupHeader:focus {
outline-offset: -2px;
}
@@ -731,7 +731,7 @@ h1.groupHeader {
/* Time Info tip */
.timeInfoTip {
width: 150px;
width: 150px;
height: 40px
}
@@ -944,7 +944,7 @@ h1.groupHeader {
/*overflow-x: auto; HTML is damaged in case of big (2-3MB) responses */
}
/* replaced by .netInfoTextSelected for IE6 support
/* replaced by .netInfoTextSelected for IE6 support
.netInfoText[selected="true"] {
display: block;
}
@@ -963,7 +963,7 @@ h1.groupHeader {
}
.netInfoPostText .netInfoParamName {
width: 1px; /* Google Chrome need this otherwise the first column of
width: 1px; /* Google Chrome need this otherwise the first column of
the post variables table will be larger than expected */
}
@@ -1148,7 +1148,7 @@ h1.groupHeader {
}
* html .opened .spyHead .spyTitle,
* html .opened .logGroupLabel,
* html .opened .logGroupLabel,
* html .opened .memberLabelCell .memberLabel {
background-image: url(tree_close.gif);
background-repeat: no-repeat;
@@ -1677,7 +1677,7 @@ h1.groupHeader {
/*
.logRow-errorMessage > .hasTwisty > .errorTitle,
.logRow-spy .spyHead .spyTitle,
.logGroup > .logRow
.logGroup > .logRow
*/
.logRow-errorMessage .hasTwisty .errorTitle,
.logRow-spy .spyHead .spyTitle,
@@ -2056,11 +2056,11 @@ h1.groupHeader {
width: 10px;
height: 10px;
margin-top: 6px;
background: url(tabMenuTarget.png);
background: url(tabMenuTarget.png);
}
.fbTabMenuTarget:hover {
background: url(tabMenuTargetHover.png);
background: url(tabMenuTargetHover.png);
}
.fbShadow {
@@ -2098,7 +2098,7 @@ h1.groupHeader {
padding: 1px 18px 0;
text-decoration: none;
color: #000;
cursor: default;
cursor: default;
background: #ACA899;
margin: 4px 0;
}
@@ -2149,7 +2149,7 @@ h1.groupHeader {
}
.fbMenuShortcut {
padding-right: 85px;
padding-right: 85px;
}
.fbMenuShortcutKey {
@@ -2274,7 +2274,7 @@ h1.groupHeader {
margin: 0;
padding: 0;
overflow: hidden;
font-family: Lucida Grande, Tahoma, sans-serif;
font-size: 11px;
background: #fff;
@@ -2311,7 +2311,7 @@ h1.groupHeader {
margin: 0 5px 0 0;
background: #fff url(search.png) no-repeat 4px 2px !important;
background: #fff url(search.gif) no-repeat 4px 2px;
padding-left: 20px;
padding-left: 20px;
font-size: 11px;
}
@@ -2333,7 +2333,7 @@ h1.groupHeader {
background: url(errorIcon.png) no-repeat !important;
background: url(errorIcon.gif) no-repeat;
color: #f00;
font-weight: bold;
font-weight: bold;
}
#fbMiniErrors {
@@ -2348,7 +2348,7 @@ h1.groupHeader {
margin: 3px 4px 0;
height: 20px;
width: 20px;
float: right;
float: right;
background: url(sprite.png) 0 -135px;
cursor: pointer;
}
@@ -2403,10 +2403,10 @@ h1.groupHeader {
}
/************************************************************************************************
Sub-Layout
Sub-Layout
*************************************************************************************************/
/* fbToolbar
/* fbToolbar
*************************************************************************************************/
#fbToolbarIcon {
float: left;
@@ -2472,7 +2472,7 @@ h1.groupHeader {
#fbStatusBarBox {
top: 4px;
cursor: default;
cursor: default;
}
.fbToolbarSeparator {
@@ -2500,7 +2500,7 @@ h1.groupHeader {
.fbStatusBar a:hover {
color: blue;
cursor: pointer;
cursor: pointer;
}
@@ -2545,7 +2545,7 @@ h1.groupHeader {
padding-left: 4px;
}
/* body
/* body
*************************************************************************************************/
.fbPanel {
display: none;
@@ -2609,7 +2609,7 @@ h1.groupHeader {
position: absolute;
right: 2px;
bottom: 3px;
z-index: 99;
}
@@ -2624,7 +2624,7 @@ h1.groupHeader {
visibility: hidden !important;
}
/* fbBottom
/* fbBottom
*************************************************************************************************/
#fbCommand {
@@ -2689,7 +2689,7 @@ div.fbFitHeight {
Layout Controls
*************************************************************************************************/
/* fbToolbar buttons
/* fbToolbar buttons
*************************************************************************************************/
.fbSmallButton {
overflow: hidden;
@@ -2729,7 +2729,7 @@ div.fbFitHeight {
}
/* fbPanelBarBox tabs
/* fbPanelBarBox tabs
*************************************************************************************************/
.fbTab {
text-decoration: none;
@@ -2785,7 +2785,7 @@ a.fbTab:hover .fbTabR {
background: url(sprite.png) -8px -96px !important;
}
/* splitters
/* splitters
*************************************************************************************************/
#fbHSplitter {
position: fixed;
@@ -2888,7 +2888,7 @@ div.objectBox-element {
position: relative;
}
/* Webkit CSS Hack - bug in "highlight" named color */
/* Webkit CSS Hack - bug in "highlight" named color */
@media screen and (-webkit-min-device-pixel-ratio:0) {
.selectedElement{
background: #316AC5;
@@ -2903,7 +2903,7 @@ div.objectBox-element {
}
/* TODO: remove this? */
/* TODO: xxxpedro - IE need this in windowless mode (cnn.com) check if the issue is related to
/* TODO: xxxpedro - IE need this in windowless mode (cnn.com) check if the issue is related to
position. if so, override it at chrome.js initialization when creating the div */
.logRow {
position: relative;
@@ -2939,9 +2939,9 @@ position. if so, override it at chrome.js initialization when creating the div *
.objectBox-string {
color: red;
/* TODO: xxxpedro make long strings break line */
/*white-space: pre; */
/*white-space: pre; */
}
.objectBox-number {

80
vendor/firebug-lite/skin/xp/firebug.html vendored Executable file → Normal file
View File

@@ -14,71 +14,71 @@
<tr>
<!-- Interface - Top Area -->
<td id="fbTop" colspan="2">
<!--
<!--
<div>
--><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
--><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
<input type="text" id="fbToolbarSearch" />
</div>
-->
<!-- Window Buttons -->
<div id="fbWindowButtons">
<a id="fbWindow_btDeactivate" class="fbSmallButton fbHover" title="Deactivate Firebug for this web page">&nbsp;</a>
<a id="fbWindow_btDetach" class="fbSmallButton fbHover" title="Open Firebug in popup window">&nbsp;</a>
<a id="fbWindow_btClose" class="fbSmallButton fbHover" title="Minimize Firebug">&nbsp;</a>
</div>
<!-- Toolbar buttons and Status Bar -->
<div id="fbToolbar">
<div id="fbToolbarContent">
<!-- Firebug Button -->
<span id="fbToolbarIcon">
<a id="fbFirebugButton" class="fbIconButton" class="fbHover" target="_blank">&nbsp;</a>
</span>
<!--
<!--
<span id="fbLeftToolbarErrors" class="fbErrors">2 errors</span>
-->
<!-- Toolbar Buttons -->
<span id="fbToolbarButtons">
<!-- Fixed Toolbar Buttons -->
<span id="fbFixedButtons">
<a id="fbChrome_btInspect" class="fbButton fbHover" title="Click an element in the page to inspect">Inspect</a>
</span>
<!-- Console Panel Toolbar Buttons -->
<span id="fbConsoleButtons" class="fbToolbarButtons">
<a id="fbConsole_btClear" class="fbButton fbHover" title="Clear the console">Clear</a>
</span>
<!-- HTML Panel Toolbar Buttons -->
<!--
<!--
<span id="fbHTMLButtons" class="fbToolbarButtons">
<a id="fbHTML_btEdit" class="fbHover" title="Edit this HTML">Edit</a>
</span>
-->
</span>
<!-- Status Bar -->
<span id="fbStatusBarBox">
<span class="fbToolbarSeparator"></span>
<!-- HTML Panel Status Bar -->
<!--
<!--
<span id="fbHTMLStatusBar" class="fbStatusBar fbToolbarButtons">
</span>
-->
</span>
</div>
</div>
<!-- PanelBars -->
<div id="fbPanelBarBox">
<!-- Main PanelBar -->
<div id="fbPanelBar1" class="fbPanelBar">
<a id="fbConsoleTab" class="fbTab fbHover">
@@ -112,7 +112,7 @@
<!-- Side PanelBars -->
<div id="fbPanelBar2Box" class="hide">
<div id="fbPanelBar2" class="fbPanelBar">
<!--
<!--
<a class="fbTab fbHover">
<span class="fbTabL"></span>
<span class="fbTabText">Style</span>
@@ -131,18 +131,18 @@
-->
</div>
</div>
</div>
<!-- Horizontal Splitter -->
<div id="fbHSplitter">&nbsp;</div>
</td>
</tr>
<!-- Interface - Main Area -->
<tr id="fbContent">
<!-- Panels -->
<td id="fbPanelBox1">
<div id="fbPanel1" class="fbFitHeight">
@@ -150,41 +150,41 @@
<div id="fbHTML" class="fbPanel"></div>
</div>
</td>
<!-- Side Panel Box -->
<td id="fbPanelBox2" class="hide">
<!-- VerticalSplitter -->
<div id="fbVSplitter" class="fbVSplitter">&nbsp;</div>
<!-- Side Panels -->
<div id="fbPanel2" class="fbFitHeight">
<!-- HTML Side Panels -->
<div id="fbHTML_Style" class="fbPanel"></div>
<div id="fbHTML_Layout" class="fbPanel"></div>
<div id="fbHTML_DOM" class="fbPanel"></div>
</div>
<!-- Large Command Line -->
<textarea id="fbLargeCommandLine" class="fbFitHeight"></textarea>
<!-- Large Command Line Buttons -->
<div id="fbLargeCommandButtons">
<a id="fbCommand_btRun" class="fbButton fbHover">Run</a>
<a id="fbCommand_btClear" class="fbButton fbHover">Clear</a>
<a id="fbSmallCommandLineIcon" class="fbSmallButton fbHover"></a>
</div>
</td>
</tr>
<!-- Interface - Bottom Area -->
<tr id="fbBottom" class="hide">
<!-- Command Line -->
<td id="fbCommand" colspan="2">
<div id="fbCommandBox">
@@ -193,18 +193,18 @@
<a id="fbLargeCommandLineIcon" class="fbSmallButton fbHover"></a>
</div>
</td>
</tr>
</tbody>
</table>
</table>
<span id="fbMiniChrome">
<span id="fbMiniContent">
<span id="fbMiniIcon" title="Open Firebug Lite"></span>
<span id="fbMiniErrors" class="fbErrors"><!-- 2 errors --></span>
</span>
</span>
<!--
<!--
<div id="fbErrorPopup">
<div id="fbErrorPopupContent">
<div id="fbErrorIndicator" class="fbErrors">2 errors</div>

0
vendor/firebug-lite/skin/xp/firebug.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
vendor/firebug-lite/skin/xp/group.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 158 B

0
vendor/firebug-lite/skin/xp/html.css vendored Executable file → Normal file
View File

0
vendor/firebug-lite/skin/xp/infoIcon.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 359 B

0
vendor/firebug-lite/skin/xp/infoIcon.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 524 B

0
vendor/firebug-lite/skin/xp/loading_16.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
vendor/firebug-lite/skin/xp/min.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 552 B

Some files were not shown because too many files have changed in this diff Show More