diff --git a/build.js b/build.js
index 9150046b8..b9881c0b2 100755
--- a/build.js
+++ b/build.js
@@ -420,12 +420,7 @@
* @returns {String} Returns the modified source.
*/
function addCommandsToHeader(source, commands) {
- return source.replace(/(\/\*!\n)( \*)?( *Lo-Dash [\w.-]+)(.*)/, function() {
- // convert unmatched groups to empty strings
- var parts = _.map(slice.call(arguments, 1), function(part) {
- return part || '';
- });
-
+ return source.replace(/(\/\**\n)( \*)( *@license[\s*]+)( *Lo-Dash [\w.-]+)(.*)/, function() {
// remove `node path/to/build.js` from `commands`
if (commands[0] == 'node') {
commands.splice(0, 2);
@@ -440,9 +435,11 @@
return command;
});
// add build commands to copyright/license header
+ var parts = slice.call(arguments, 1);
return (
parts[0] +
- parts[1] + parts[2] + ' (Custom Build)' + parts[3] + '\n' +
+ parts[1] +
+ parts[2] + parts[3] + ' (Custom Build)' + parts[4] + '\n' +
parts[1] + ' Build: `lodash ' + commands.join(' ') + '`'
);
});
@@ -1944,7 +1941,7 @@
var token = '%output%',
index = iife.indexOf(token);
- source = source.match(/\/\*![\s\S]+?\*\/\n/) +
+ source = source.match(/^\/\**[\s\S]+?\*\/\n/) +
iife.slice(0, index) +
source.replace(/^[\s\S]+?\(function[^{]+?{|}\(this\)\)[;\s]*$/g, '') +
iife.slice(index + token.length);
diff --git a/build/minify.js b/build/minify.js
index c9f166d2f..a6860c81d 100755
--- a/build/minify.js
+++ b/build/minify.js
@@ -204,6 +204,7 @@
// restrict lines to 500 characters for consistency with the Closure Compiler
var stream = uglifyJS.OutputStream({
'ascii_only': true,
+ 'comments': true,
'max_line_len': 500,
});
diff --git a/build/post-compile.js b/build/post-compile.js
index 6ea6cda9f..bcb4cc8bb 100644
--- a/build/post-compile.js
+++ b/build/post-compile.js
@@ -6,15 +6,13 @@
var fs = require('fs');
/** The minimal license/copyright template */
- var licenseTemplate = {
- 'lodash':
- '/*!\n' +
- ' Lo-Dash <%= VERSION %> lodash.com/license\n' +
- ' Underscore.js 1.4.3 underscorejs.org/LICENSE\n' +
- '*/',
- 'underscore':
- '/*! Underscore.js <%= VERSION %> underscorejs.org/LICENSE */'
- };
+ var licenseTemplate = [
+ '/**',
+ ' * @license',
+ ' * Lo-Dash <%= VERSION %> lodash.com/license',
+ ' * Underscore.js 1.4.3 underscorejs.org/LICENSE',
+ ' */'
+ ].join('\n');
/*--------------------------------------------------------------------------*/
@@ -26,6 +24,9 @@
* @returns {String} Returns the processed source.
*/
function postprocess(source) {
+ // remove old copyright/license header
+ source = source.replace(/^\/\**[\s\S]+?\*\/\n/, '');
+
// move vars exposed by the Closure Compiler into the IIFE
source = source.replace(/^((?:(['"])use strict\2;)?(?:var (?:[a-z]+=(?:!0|!1|null)[,;])+)?)([\s\S]*?function[^)]+\){)/, '$3$1');
@@ -53,9 +54,11 @@
if (!snippet) {
return source;
}
- // add copyright/license header
- return licenseTemplate[/call\(this\);?$/.test(source) ? 'underscore' : 'lodash']
- .replace('<%= VERSION %>', snippet[2]) + '\n;' + source;
+ // add new copyright/license header
+ var version = snippet[2];
+ source = licenseTemplate.replace('<%= VERSION %>', version) + '\n;' + source;
+
+ return source;
}
/*--------------------------------------------------------------------------*/
diff --git a/build/pre-compile.js b/build/pre-compile.js
index 1aaa93ba4..f4f19ca5d 100644
--- a/build/pre-compile.js
+++ b/build/pre-compile.js
@@ -191,11 +191,7 @@
// properties used by the `backbone` and `underscore` builds
'__chain__',
- 'chain',
-
- // properties used by underscore.js
- '_chain',
- '_wrapped'
+ 'chain'
];
/*--------------------------------------------------------------------------*/
@@ -217,9 +213,6 @@
if (options.isTemplate) {
return source;
}
- // remove copyright/license header to add later in post-compile.js
- source = source.replace(/\/\*![\s\S]+?\*\//, '');
-
// 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) {
@@ -229,9 +222,6 @@
// remove brackets from `_.escape()` in `_.template`
source = source.replace(/__e *= *_\['escape']/g, '__e=_.escape');
- // remove brackets from `_.escape()` in underscore.js `_.template`
- source = source.replace(/_\['escape'\]\(__t'/g, '_.escape(__t');
-
// remove brackets from `collection.indexOf` in `_.contains`
source = source.replace("collection['indexOf'](target)", 'collection.indexOf(target)');
@@ -252,9 +242,6 @@
return (captured || '') + string;
});
- // add newline to `+"__p+='"` in underscore.js `_.template`
- source = source.replace(/\+"__p\+='"/g, '+"\\n__p+=\'"');
-
// add newline to `body + '}'` in `createFunction`
source = source.replace(/body *\+ *'}'/, 'body+"\\n}"');
diff --git a/doc/README.md b/doc/README.md
index ab0b3a6ee..8cf29490c 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -187,7 +187,7 @@
### `_.compact(array)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2763 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2764 "View in source") [Ⓣ][1]
Creates an array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
@@ -211,7 +211,7 @@ _.compact([0, 1, false, 2, '', 3]);
### `_.difference(array [, array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2793 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2794 "View in source") [Ⓣ][1]
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
@@ -236,7 +236,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
### `_.first(array [, n])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2828 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2829 "View in source") [Ⓣ][1]
Gets the first element of the `array`. Pass `n` to return the first `n` elements of the `array`.
@@ -264,7 +264,7 @@ _.first([5, 4, 3, 2, 1]);
### `_.flatten(array, shallow)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2855 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2856 "View in source") [Ⓣ][1]
Flattens a nested array *(the nesting can be to any depth)*. If `shallow` is truthy, `array` will only be flattened a single level.
@@ -292,7 +292,7 @@ _.flatten([1, [2], [3, [[4]]]], true);
### `_.indexOf(array, value [, fromIndex=0])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2897 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2898 "View in source") [Ⓣ][1]
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `fromIndex` will run a faster binary search.
@@ -324,7 +324,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
### `_.initial(array [, n=1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2932 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2933 "View in source") [Ⓣ][1]
Gets all but the last element of `array`. Pass `n` to exclude the last `n` elements from the result.
@@ -349,7 +349,7 @@ _.initial([3, 2, 1]);
### `_.intersection([array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2956 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2957 "View in source") [Ⓣ][1]
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
@@ -373,7 +373,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
### `_.last(array [, n])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3009 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3010 "View in source") [Ⓣ][1]
Gets the last element of the `array`. Pass `n` to return the last `n` elements of the `array`.
@@ -398,7 +398,7 @@ _.last([3, 2, 1]);
### `_.lastIndexOf(array, value [, fromIndex=array.length-1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3036 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3037 "View in source") [Ⓣ][1]
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
@@ -427,7 +427,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
### `_.object(keys [, values=[]])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3066 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3067 "View in source") [Ⓣ][1]
Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`.
@@ -452,7 +452,7 @@ _.object(['moe', 'larry', 'curly'], [30, 40, 50]);
### `_.range([start=0], end [, step=1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3111 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3112 "View in source") [Ⓣ][1]
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `stop`. This method is a port of Python's `range()` function. See http://docs.python.org/library/functions.html#range.
@@ -490,7 +490,7 @@ _.range(0);
### `_.rest(array [, n=1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3150 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3151 "View in source") [Ⓣ][1]
The opposite of `_.initial`, this method gets all but the first value of `array`. Pass `n` to exclude the first `n` values from the result.
@@ -518,7 +518,7 @@ _.rest([3, 2, 1]);
### `_.sortedIndex(array, value [, callback=identity|property, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3194 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3195 "View in source") [Ⓣ][1]
Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*. The `callback` argument may also be the name of a property to order by.
@@ -562,7 +562,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
### `_.union([array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3226 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3227 "View in source") [Ⓣ][1]
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
@@ -586,7 +586,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
### `_.uniq(array [, isSorted=false, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3260 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3261 "View in source") [Ⓣ][1]
Creates a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each element of `array` is passed through a callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
@@ -625,7 +625,7 @@ _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
### `_.without(array [, value1, value2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3319 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3320 "View in source") [Ⓣ][1]
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
@@ -650,7 +650,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
### `_.zip([array1, array2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3350 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3351 "View in source") [Ⓣ][1]
Groups the elements of each array at their corresponding indexes. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
@@ -681,7 +681,7 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]);
### `_(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L278 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L279 "View in source") [Ⓣ][1]
Creates a `lodash` object, that wraps the given `value`, to enable method chaining.
@@ -707,7 +707,7 @@ The wrapper functions `first` and `last` return wrapped values when `n` is passe
### `_.tap(value, interceptor)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4218 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4219 "View in source") [Ⓣ][1]
Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
@@ -737,7 +737,7 @@ _.chain([1, 2, 3, 200])
### `_.prototype.toString()`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4235 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4236 "View in source") [Ⓣ][1]
Produces the `toString` result of the wrapped value.
@@ -758,7 +758,7 @@ _([1, 2, 3]).toString();
### `_.prototype.valueOf()`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4252 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4253 "View in source") [Ⓣ][1]
Extracts the wrapped value.
@@ -789,7 +789,7 @@ _([1, 2, 3]).valueOf();
### `_.at(collection [, index1, index2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1960 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1961 "View in source") [Ⓣ][1]
Creates an array of elements from the specified index(es), or keys, of the `collection`. Indexes may be specified as individual arguments or as arrays of indexes.
@@ -817,7 +817,7 @@ _.at(['moe', 'larry', 'curly'], 0, 2);
### `_.contains(collection, target [, fromIndex=0])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2002 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2003 "View in source") [Ⓣ][1]
Checks if a given `target` element is present in a `collection` using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
@@ -855,7 +855,7 @@ _.contains('curly', 'ur');
### `_.countBy(collection, callback|property [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2049 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2050 "View in source") [Ⓣ][1]
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is the number of times the key was returned by `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to count by *(e.g. 'length')*.
@@ -887,7 +887,7 @@ _.countBy(['one', 'two', 'three'], 'length');
### `_.every(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2079 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2080 "View in source") [Ⓣ][1]
Checks if the `callback` returns a truthy value for **all** elements of a `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -916,7 +916,7 @@ _.every([true, 1, null, 'yes'], Boolean);
### `_.filter(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2118 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2119 "View in source") [Ⓣ][1]
Examines each element in a `collection`, returning an array of all elements the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -945,7 +945,7 @@ var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; })
### `_.find(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2162 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2163 "View in source") [Ⓣ][1]
Examines each element in a `collection`, returning the first one the `callback` returns truthy for. The function returns as soon as it finds an acceptable element, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -974,7 +974,7 @@ var even = _.find([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
### `_.forEach(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2197 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2198 "View in source") [Ⓣ][1]
Iterates over a `collection`, executing the `callback` for each element in the `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`.
@@ -1006,7 +1006,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
### `_.groupBy(collection, callback|property [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2239 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2240 "View in source") [Ⓣ][1]
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is an array of elements passed to `callback` that returned the key. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to group by *(e.g. 'length')*.
@@ -1038,7 +1038,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
### `_.invoke(collection, methodName [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2272 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2273 "View in source") [Ⓣ][1]
Invokes the method named by `methodName` on each element in the `collection`, returning an array of the results of each invoked method. Additional arguments will be passed to each invoked method. If `methodName` is a function it will be invoked for, and `this` bound to, each element in the `collection`.
@@ -1067,7 +1067,7 @@ _.invoke([123, 456], String.prototype.split, '');
### `_.map(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2304 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2305 "View in source") [Ⓣ][1]
Creates an array of values by running each element in the `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -1099,7 +1099,7 @@ _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
### `_.max(collection [, callback, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2346 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2347 "View in source") [Ⓣ][1]
Retrieves the maximum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
@@ -1131,7 +1131,7 @@ _.max(stooges, function(stooge) { return stooge.age; });
### `_.min(collection [, callback, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2392 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2393 "View in source") [Ⓣ][1]
Retrieves the minimum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
@@ -1157,7 +1157,7 @@ _.min([10, 5, 100, 2, 1000]);
### `_.pluck(collection, property)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2441 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2442 "View in source") [Ⓣ][1]
Retrieves the value of a specified property from all elements in the `collection`.
@@ -1188,7 +1188,7 @@ _.pluck(stooges, 'name');
### `_.reduce(collection [, callback=identity, accumulator, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2465 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2466 "View in source") [Ⓣ][1]
Reduces a `collection` to a single value. The initial state of the reduction is `accumulator` and each successive step of it should be returned by the `callback`. The `callback` is bound to `thisArg` and invoked with four arguments; for arrays they are *(accumulator, value, index|key, collection)*.
@@ -1218,7 +1218,7 @@ var sum = _.reduce([1, 2, 3], function(memo, num) { return memo + num; });
### `_.reduceRight(collection [, callback=identity, accumulator, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2507 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2508 "View in source") [Ⓣ][1]
The right-associative version of `_.reduce`.
@@ -1249,7 +1249,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
### `_.reject(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2545 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2546 "View in source") [Ⓣ][1]
The opposite of `_.filter`, this method returns the elements of a `collection` that `callback` does **not** return truthy for.
@@ -1275,7 +1275,7 @@ var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
### `_.shuffle(collection)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2566 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2567 "View in source") [Ⓣ][1]
Creates an array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
@@ -1299,7 +1299,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
### `_.size(collection)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2598 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2599 "View in source") [Ⓣ][1]
Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects.
@@ -1329,7 +1329,7 @@ _.size('curly');
### `_.some(collection [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2623 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2624 "View in source") [Ⓣ][1]
Checks if the `callback` returns a truthy value for **any** element of a `collection`. The function returns as soon as it finds passing value, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -1358,7 +1358,7 @@ _.some([null, 0, 'yes', false], Boolean);
### `_.sortBy(collection, callback|property [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2669 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2670 "View in source") [Ⓣ][1]
Creates an array, stable sorted in ascending order by the results of running each element of `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to sort by *(e.g. 'length')*.
@@ -1390,7 +1390,7 @@ _.sortBy(['larry', 'brendan', 'moe'], 'length');
### `_.toArray(collection)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2702 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2703 "View in source") [Ⓣ][1]
Converts the `collection` to an array.
@@ -1414,7 +1414,7 @@ Converts the `collection` to an array.
### `_.where(collection, properties)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2733 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2734 "View in source") [Ⓣ][1]
Examines each element in a `collection`, returning an array of all elements that contain the given `properties`.
@@ -1452,7 +1452,7 @@ _.where(stooges, { 'age': 40 });
### `_.after(n, func)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3383 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3384 "View in source") [Ⓣ][1]
Creates a function that is restricted to executing `func` only after it is called `n` times. The `func` is executed with the `this` binding of the created function.
@@ -1480,7 +1480,7 @@ _.forEach(notes, function(note) {
### `_.bind(func [, thisArg, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3416 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3417 "View in source") [Ⓣ][1]
Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function.
@@ -1511,7 +1511,7 @@ func();
### `_.bindAll(object [, methodName1, methodName2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3446 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3447 "View in source") [Ⓣ][1]
Binds methods on `object` to `object`, overwriting the existing method. If no method names are provided, all the function properties of `object` will be bound.
@@ -1542,7 +1542,7 @@ jQuery('#lodash_button').on('click', buttonView.onClick);
### `_.bindKey(object, key [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3492 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3493 "View in source") [Ⓣ][1]
Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those passed to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern.
@@ -1583,7 +1583,7 @@ func();
### `_.compose([func1, func2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3515 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3516 "View in source") [Ⓣ][1]
Creates a function that is the composition of the passed functions, where each function consumes the return value of the function that follows. In math terms, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. Each function is executed with the `this` binding of the composed function.
@@ -1610,7 +1610,7 @@ welcome('moe');
### `_.debounce(func, wait, immediate)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3548 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3549 "View in source") [Ⓣ][1]
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
@@ -1636,7 +1636,7 @@ jQuery(window).on('resize', lazyLayout);
### `_.defer(func [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3612 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3613 "View in source") [Ⓣ][1]
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
@@ -1661,7 +1661,7 @@ _.defer(function() { alert('deferred'); });
### `_.delay(func, wait [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3592 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3593 "View in source") [Ⓣ][1]
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
@@ -1688,7 +1688,7 @@ _.delay(log, 1000, 'logged later');
### `_.memoize(func [, resolver])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3636 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3637 "View in source") [Ⓣ][1]
Creates a function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function.
@@ -1714,7 +1714,7 @@ var fibonacci = _.memoize(function(n) {
### `_.once(func)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3663 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3664 "View in source") [Ⓣ][1]
Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function.
@@ -1740,7 +1740,7 @@ initialize();
### `_.partial(func [, arg1, arg2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3698 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3699 "View in source") [Ⓣ][1]
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `bind`, except it does **not** alter the `this` binding.
@@ -1767,7 +1767,7 @@ hi('moe');
### `_.throttle(func, wait)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3720 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3721 "View in source") [Ⓣ][1]
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
@@ -1792,7 +1792,7 @@ jQuery(window).on('scroll', throttled);
### `_.wrap(value, wrapper)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3773 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3774 "View in source") [Ⓣ][1]
Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the function are appended to those passed to the `wrapper` function. The `wrapper` is executed with the `this` binding of the created function.
@@ -1828,7 +1828,7 @@ hello();
### `_.assign(object [, source1, source2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L813 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L814 "View in source") [Ⓣ][1]
Assigns own enumerable properties of source object(s) to the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
@@ -1856,7 +1856,7 @@ _.assign({ 'name': 'moe' }, { 'age': 40 });
### `_.clone(value, deep)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1023 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1024 "View in source") [Ⓣ][1]
Creates a clone of `value`. If `deep` is `true`, nested objects will also be cloned, otherwise they will be assigned by reference.
@@ -1892,7 +1892,7 @@ deep[0] === stooges[0];
### `_.cloneDeep(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1118 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1119 "View in source") [Ⓣ][1]
Creates a deep clone of `value`. Functions and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and objects created by constructors other than `Object` are cloned to plain `Object` objects.
@@ -1925,7 +1925,7 @@ deep[0] === stooges[0];
### `_.defaults(object [, default1, default2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1140 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1141 "View in source") [Ⓣ][1]
Assigns own enumerable properties of source object(s) to the `destination` object for all `destination` properties that resolve to `null`/`undefined`. Once a property is set, additional defaults of the same property will be ignored.
@@ -1951,7 +1951,7 @@ _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'rainbow' });
### `_.forIn(object [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L869 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L870 "View in source") [Ⓣ][1]
Iterates over `object`'s own and inherited enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
@@ -1987,7 +1987,7 @@ _.forIn(new Dog('Dagny'), function(value, key) {
### `_.forOwn(object [, callback=identity, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L893 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L894 "View in source") [Ⓣ][1]
Iterates over an object's own enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
@@ -2015,7 +2015,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
### `_.functions(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1159 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1160 "View in source") [Ⓣ][1]
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
@@ -2042,7 +2042,7 @@ _.functions(_);
### `_.has(object, property)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1184 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1185 "View in source") [Ⓣ][1]
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
@@ -2067,7 +2067,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
### `_.invert(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1201 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1202 "View in source") [Ⓣ][1]
Creates an object composed of the inverted keys and values of the given `object`.
@@ -2091,7 +2091,7 @@ _.invert({ 'first': 'Moe', 'second': 'Larry', 'third': 'Curly' });
### `_.isArguments(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L831 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L832 "View in source") [Ⓣ][1]
Checks if `value` is an `arguments` object.
@@ -2118,7 +2118,7 @@ _.isArguments([1, 2, 3]);
### `_.isArray(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1230 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1231 "View in source") [Ⓣ][1]
Checks if `value` is an array.
@@ -2145,7 +2145,7 @@ _.isArray([1, 2, 3]);
### `_.isBoolean(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1249 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1250 "View in source") [Ⓣ][1]
Checks if `value` is a boolean *(`true` or `false`)* value.
@@ -2169,7 +2169,7 @@ _.isBoolean(null);
### `_.isDate(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1266 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1267 "View in source") [Ⓣ][1]
Checks if `value` is a date.
@@ -2193,7 +2193,7 @@ _.isDate(new Date);
### `_.isElement(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1283 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1284 "View in source") [Ⓣ][1]
Checks if `value` is a DOM element.
@@ -2217,7 +2217,7 @@ _.isElement(document.body);
### `_.isEmpty(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1308 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1309 "View in source") [Ⓣ][1]
Checks if `value` is empty. Arrays, strings, or `arguments` objects with a length of `0` and objects with no own enumerable properties are considered "empty".
@@ -2247,7 +2247,7 @@ _.isEmpty('');
### `_.isEqual(a, b)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1350 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1351 "View in source") [Ⓣ][1]
Performs a deep comparison between two values to determine if they are equivalent to each other.
@@ -2278,7 +2278,7 @@ _.isEqual(moe, clone);
### `_.isFinite(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1501 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1502 "View in source") [Ⓣ][1]
Checks if `value` is, or can be coerced to, a finite number.
@@ -2316,7 +2316,7 @@ _.isFinite(Infinity);
### `_.isFunction(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1518 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1519 "View in source") [Ⓣ][1]
Checks if `value` is a function.
@@ -2340,7 +2340,7 @@ _.isFunction(_);
### `_.isNaN(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1581 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1582 "View in source") [Ⓣ][1]
Checks if `value` is `NaN`.
@@ -2375,7 +2375,7 @@ _.isNaN(undefined);
### `_.isNull(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1603 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1604 "View in source") [Ⓣ][1]
Checks if `value` is `null`.
@@ -2402,7 +2402,7 @@ _.isNull(undefined);
### `_.isNumber(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1620 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1621 "View in source") [Ⓣ][1]
Checks if `value` is a number.
@@ -2426,7 +2426,7 @@ _.isNumber(8.4 * 5);
### `_.isObject(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1548 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1549 "View in source") [Ⓣ][1]
Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
@@ -2456,7 +2456,7 @@ _.isObject(1);
### `_.isPlainObject(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1648 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1649 "View in source") [Ⓣ][1]
Checks if a given `value` is an object created by the `Object` constructor.
@@ -2491,7 +2491,7 @@ _.isPlainObject({ 'name': 'moe', 'age': 40 });
### `_.isRegExp(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1673 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1674 "View in source") [Ⓣ][1]
Checks if `value` is a regular expression.
@@ -2515,7 +2515,7 @@ _.isRegExp(/moe/);
### `_.isString(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1690 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1691 "View in source") [Ⓣ][1]
Checks if `value` is a string.
@@ -2539,7 +2539,7 @@ _.isString('moe');
### `_.isUndefined(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1707 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1708 "View in source") [Ⓣ][1]
Checks if `value` is `undefined`.
@@ -2563,7 +2563,7 @@ _.isUndefined(void 0);
### `_.keys(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L908 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L909 "View in source") [Ⓣ][1]
Creates an array composed of the own enumerable property names of `object`.
@@ -2587,7 +2587,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
### `_.merge(object [, source1, source2, ...])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1742 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1743 "View in source") [Ⓣ][1]
Recursively merges own enumerable properties of the source object(s), that don't resolve to `null`/`undefined`, into the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
@@ -2622,7 +2622,7 @@ _.merge(stooges, ages);
### `_.omit(object, callback|[prop1, prop2, ..., thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1816 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1817 "View in source") [Ⓣ][1]
Creates a shallow clone of `object` excluding the specified properties. Property names may be specified as individual arguments or as arrays of property names. If `callback` is passed, it will be executed for each property in the `object`, omitting the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
@@ -2653,7 +2653,7 @@ _.omit({ 'name': 'moe', '_hint': 'knucklehead', '_seed': '96c4eb' }, function(va
### `_.pairs(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1850 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1851 "View in source") [Ⓣ][1]
Creates a two dimensional array of the given object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
@@ -2677,7 +2677,7 @@ _.pairs({ 'moe': 30, 'larry': 40, 'curly': 50 });
### `_.pick(object, callback|[prop1, prop2, ..., thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1888 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1889 "View in source") [Ⓣ][1]
Creates a shallow clone of `object` composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. If `callback` is passed, it will be executed for each property in the `object`, picking the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
@@ -2708,7 +2708,7 @@ _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) {
### `_.values(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1925 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1926 "View in source") [Ⓣ][1]
Creates an array composed of the own enumerable property values of `object`.
@@ -2739,7 +2739,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
### `_.escape(string)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3797 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3798 "View in source") [Ⓣ][1]
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
@@ -2763,7 +2763,7 @@ _.escape('Moe, Larry & Curly');
### `_.identity(value)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3815 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3816 "View in source") [Ⓣ][1]
This function returns the first argument passed to it.
@@ -2788,7 +2788,7 @@ moe === _.identity(moe);
### `_.mixin(object)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3841 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3842 "View in source") [Ⓣ][1]
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
@@ -2818,7 +2818,7 @@ _('curly').capitalize();
### `_.noConflict()`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3867 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3868 "View in source") [Ⓣ][1]
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
@@ -2838,7 +2838,7 @@ var lodash = _.noConflict();
### `_.random([min=0, max=1])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3890 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3891 "View in source") [Ⓣ][1]
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned.
@@ -2866,7 +2866,7 @@ _.random(5);
### `_.result(object, property)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3928 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3929 "View in source") [Ⓣ][1]
Resolves the value of `property` on `object`. If `property` is a function it will be invoked and its result returned, else the property value is returned. If `object` is falsey, then `null` is returned.
@@ -2901,7 +2901,7 @@ _.result(object, 'stuff');
### `_.template(text, data, options)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4013 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4014 "View in source") [Ⓣ][1]
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
@@ -2979,7 +2979,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
### `_.times(n, callback [, thisArg])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4144 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4145 "View in source") [Ⓣ][1]
Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*.
@@ -3011,7 +3011,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
### `_.unescape(string)`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4170 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4171 "View in source") [Ⓣ][1]
The opposite of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
@@ -3035,7 +3035,7 @@ _.unescape('Moe, Larry & Curly');
### `_.uniqueId([prefix])`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4190 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4191 "View in source") [Ⓣ][1]
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
@@ -3069,7 +3069,7 @@ _.uniqueId();
### `_.VERSION`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4417 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4418 "View in source") [Ⓣ][1]
*(String)*: The semantic version number.
@@ -3081,7 +3081,7 @@ _.uniqueId();
### `_.templateSettings`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L299 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L300 "View in source") [Ⓣ][1]
*(Object)*: By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby *(ERB)*. Change the following template settings to use alternative delimiters.
@@ -3093,7 +3093,7 @@ _.uniqueId();
### `_.templateSettings.escape`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L308 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L309 "View in source") [Ⓣ][1]
*(RegExp)*: Used to detect `data` property values to be HTML-escaped.
@@ -3105,7 +3105,7 @@ _.uniqueId();
### `_.templateSettings.evaluate`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L317 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L318 "View in source") [Ⓣ][1]
*(RegExp)*: Used to detect code to be evaluated.
@@ -3117,7 +3117,7 @@ _.uniqueId();
### `_.templateSettings.interpolate`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L326 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L327 "View in source") [Ⓣ][1]
*(RegExp)*: Used to detect `data` property values to inject.
@@ -3129,7 +3129,7 @@ _.uniqueId();
### `_.templateSettings.variable`
-# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L335 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L336 "View in source") [Ⓣ][1]
*(String)*: Used to reference the data object in the template text.
diff --git a/lodash.js b/lodash.js
index 34cf62250..433b31610 100644
--- a/lodash.js
+++ b/lodash.js
@@ -1,4 +1,5 @@
-/*!
+/**
+ * @license
* Lo-Dash 1.0.0-rc.3
* (c) 2012 John-David Dalton
* Based on Underscore.js 1.4.3
diff --git a/lodash.min.js b/lodash.min.js
index 929b3a838..81f7ea106 100644
--- a/lodash.min.js
+++ b/lodash.min.js
@@ -1,7 +1,8 @@
-/*!
- Lo-Dash 1.0.0-rc.3 lodash.com/license
- Underscore.js 1.4.3 underscorejs.org/LICENSE
-*/
+/**
+ * @license
+ * Lo-Dash 1.0.0-rc.3 lodash.com/license
+ * Underscore.js 1.4.3 underscorejs.org/LICENSE
+ */
;(function(n,t){function r(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof r?(this.__wrapped__=n,void 0):new r(n)}function e(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||it);if(u)for(var o={},r=t-1;e>++r;){var i=n[r]+"";(Et.call(o,i)?o[i]:o[i]=[]).push(n[r])}return function(r){if(u){var e=r+"";return Et.call(o,e)&&C(o[e],r)>-1}return C(n,r,t)>-1}}function u(n){return n.charCodeAt(0)}function o(n,t){var r=n.b,e=t.b,n=n.a,t=t.a;if(n!==t){if(n>t||n===void 0)return 1;if(t>n||t===void 0)return-1
}return e>r?-1:1}function i(n,t,r){function e(){var a=arguments,f=o?this:t;return u||(n=t[i]),r.length&&(a=a.length?r.concat(v(a)):r),this instanceof e?(s.prototype=n.prototype,f=new s,s.prototype=W,a=n.apply(f,a),x(a)?a:f):n.apply(f,a)}var u=j(n),o=!r,i=t;return o&&(r=t),u||(t=n),e}function a(n,t,r){return n?typeof n!="function"?function(t){return t[n]}:t!==void 0?r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n:G}function f(){for(var n,t={b:"",c:"",e:nt,f:Qt,g:"",h:Xt,i:nr,j:wt,k:"",l:Q},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];
if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r="var i,l="+t.d+",t="+t.d+";if(!"+t.d+")return t;"+t.k+";",t.b?(r+="var m=l.length;i=-1;if(typeof m=='number'){",t.i&&(r+="if(k(l)){l=l.split('')}"),r+="while(++ie;e++)r+="i='"+t.j[e]+"';if(","constructor"==t.j[e]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){"+t.g+"}";
diff --git a/lodash.underscore.js b/lodash.underscore.js
index b62d81aed..a07274287 100644
--- a/lodash.underscore.js
+++ b/lodash.underscore.js
@@ -1,4 +1,5 @@
-/*!
+/**
+ * @license
* Lo-Dash 1.0.0-rc.3 (Custom Build)
* Build: `lodash underscore -d -o ./lodash.underscore.js`
* (c) 2012 John-David Dalton
@@ -1981,9 +1982,9 @@
}
/**
- * Boils down a `collection` to a single value. The initial state of the
- * reduction is `accumulator` and each successive step of it should be returned
- * by the `callback`. The `callback` is bound to `thisArg` and invoked with 4
+ * Reduces a `collection` to a single value. The initial state of the reduction
+ * is `accumulator` and each successive step of it should be returned by the
+ * `callback`. The `callback` is bound to `thisArg` and invoked with four
* arguments; for arrays they are (accumulator, value, index|key, collection).
*
* @static
diff --git a/lodash.underscore.min.js b/lodash.underscore.min.js
index f0eb6761e..1caaefa1d 100644
--- a/lodash.underscore.min.js
+++ b/lodash.underscore.min.js
@@ -1,8 +1,9 @@
-/*!
- Lo-Dash 1.0.0-rc.3 (Custom Build) lodash.com/license
- Build: `lodash underscore -m -o ./lodash.underscore.min.js`
- Underscore.js 1.4.3 underscorejs.org/LICENSE
-*/
+/**
+ * @license
+ * Lo-Dash 1.0.0-rc.3 (Custom Build) lodash.com/license
+ * Build: `lodash underscore -m -o ./lodash.underscore.min.js`
+ * Underscore.js 1.4.3 underscorejs.org/LICENSE
+ */
;(function(n,t){function r(n,t){var r;if(n)for(r in t||(t=V),n)if(ft.call(n,r)&&t(n[r],r,n)===Y)break}function e(n,t){var r;if(n)for(r in t||(t=V),n)if(t(n[r],r,n)===Y)break}function u(n,t,r){if(n){var t=t&&r===void 0?t:f(t,r),e=n.length,r=-1;if(typeof e=="number")for(;e>++r&&t(n[r],r,n)!==Y;);else for(r in n)if(ft.call(n,r)&&t(n[r],r,n)===Y)break}}function o(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof o?(this.__wrapped__=n,void 0):new o(n)}function i(n,t){var r=n.b,e=t.b,n=n.a,t=t.a;
if(n!==t){if(n>t||n===void 0)return 1;if(t>n||t===void 0)return-1}return e>r?-1:1}function a(n,t,r){function e(){var u=arguments,o=t;return r.length&&(u=u.length?r.concat(p(u)):r),this instanceof e?(s.prototype=n.prototype,o=new s,s.prototype=J,u=n.apply(o,u),j(u)?u:o):n.apply(o,u)}return e}function f(n,t,r){return n?typeof n!="function"?function(t){return t[n]}:t!==void 0?r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n:V}function c(n){return"\\"+Ft[n]}function l(n){return Tt[n]
}function s(){}function p(n,t,r){t||(t=0),r===void 0&&(r=n?n.length:0);for(var e=-1,r=r-t||0,u=Array(0>r?0:r);r>++e;)u[e]=n[t+e];return u}function v(n){return qt[n]}function g(n){if(!n)return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];if(e)for(var u in e)n[u]=e[u]}return n}function h(n){var t=[];return r(n,function(n,r){t.push(r)}),t}function _(n){if(!n)return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];if(e)for(var u in e)n[u]==J&&(n[u]=e[u])}return n}function m(n){var t=[];
diff --git a/test/test-build.js b/test/test-build.js
index f4a9de16d..6e4f76447 100644
--- a/test/test-build.js
+++ b/test/test-build.js
@@ -569,8 +569,8 @@
QUnit.module('independent builds');
(function() {
- var reComment = /\/\*![\s\S]+?\*\//,
- reCustom = /Custom Build/;
+ var reCustom = /Custom Build/,
+ reLicense = /^\/\**\s+\* @license[\s\S]+?\*\/\n/;
asyncTest('debug only', function() {
var start = _.once(QUnit.start);
@@ -585,7 +585,7 @@
build(['-d', '-s', 'backbone'], function(source, filePath) {
equal(path.basename(filePath, '.js'), 'lodash.custom');
- var comment = source.match(reComment);
+ var comment = source.match(reLicense);
ok(reCustom.test(comment));
start();
});
@@ -604,7 +604,7 @@
build(['-m', '-s', 'backbone'], function(source, filePath) {
equal(path.basename(filePath, '.js'), 'lodash.custom.min');
- var comment = source.match(reComment);
+ var comment = source.match(reLicense);
ok(reCustom.test(comment));
start();
});
@@ -985,35 +985,6 @@
/*--------------------------------------------------------------------------*/
- QUnit.module('minify underscore');
-
- (function() {
- asyncTest('`node minify underscore.js`', function() {
- var source = fs.readFileSync(path.join(__dirname, '..', 'vendor', 'underscore', 'underscore.js'), 'utf8'),
- start = _.once(QUnit.start);
-
- minify(source, {
- 'isSilent': true,
- 'workingName': 'underscore.min',
- 'onComplete': function(result) {
- var context = createContext();
-
- try {
- vm.runInContext(result, context);
- } catch(e) {
- console.log(e);
- }
- var underscore = context._ || {};
- ok(_.isString(underscore.VERSION));
- ok(!/Lo-Dash/.test(result) && result.match(/\n/g).length < source.match(/\n/g).length);
- start();
- }
- });
- });
- }());
-
- /*--------------------------------------------------------------------------*/
-
QUnit.module('mobile build');
(function() {
diff --git a/vendor/docdown/src/DocDown/Alias.php b/vendor/docdown/src/DocDown/Alias.php
index 1ca539d71..0a7c552e0 100644
--- a/vendor/docdown/src/DocDown/Alias.php
+++ b/vendor/docdown/src/DocDown/Alias.php
@@ -29,15 +29,16 @@ class Alias {
$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();
- $this->_isCtor = $owner->isCtor();
- $this->_isPlugin = $owner->isPlugin();
- $this->_isPrivate = $owner->isPrivate();
- $this->_isStatic = $owner->isStatic();
}
/*--------------------------------------------------------------------------*/
@@ -96,6 +97,66 @@ class Alias {
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.
*
@@ -161,55 +222,5 @@ class Alias {
public function getType() {
return $this->_type;
}
-
- /**
- * 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* 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;
- }
}
?>
\ No newline at end of file
diff --git a/vendor/docdown/src/DocDown/Entry.php b/vendor/docdown/src/DocDown/Entry.php
index e545d3360..f7e96f76e 100644
--- a/vendor/docdown/src/DocDown/Entry.php
+++ b/vendor/docdown/src/DocDown/Entry.php
@@ -217,6 +217,100 @@ class Entry {
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.
*
@@ -344,86 +438,5 @@ class Entry {
$this->_type = $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* 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 = !!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;
- }
}
?>
\ No newline at end of file