From a4060e62f72058dd3d492506b34c78c024456413 Mon Sep 17 00:00:00 2001 From: Keegan Date: Tue, 2 Feb 2016 21:01:20 -0800 Subject: [PATCH] remove some unneeded methods from minifiedjs --- src/scripts/vendor/minified/minified.js | 318 +----------------------- 1 file changed, 2 insertions(+), 316 deletions(-) diff --git a/src/scripts/vendor/minified/minified.js b/src/scripts/vendor/minified/minified.js index 261d22b..36a8715 100644 --- a/src/scripts/vendor/minified/minified.js +++ b/src/scripts/vendor/minified/minified.js @@ -1,8 +1,7 @@ // minified.js config start -- use this comment to re-create a configuration in the Builder // - Only sections add, always, amdsupport, copyobj, dollardollar, -// - each, eachobj, error, extend, filter, filterobj, find, format, formathtml, -// - get, ht, html, isobject, keys, map, mapobj, objvalues, off, on, ready, -// - request, select, set, template, trigger, underscore, wait. +// - each, eachobj, error, extend, format, formathtml, get, ht, html, isobject, +// - off, on, ready, request, select, set, template, trigger, underscore, wait. // WARNING! This file is autogenerated from minified-master.js and others. @@ -1550,177 +1549,6 @@ define('minified', function() { */ 'each': listBind(each), - /*$ - * @id filter - * @group LIST - * @requires - * @configurable default - * @name .filter() - * @altname _.filter() - * @syntax list.filter(filterFunc) - * @syntax list.filter(filterFunc, ctx) - * @syntax list.filter(value) - * @syntax _.filter(list, filterFunc) - * @syntax _.filter(list, filterFunc, ctx) - * @syntax _.filter(list, value) - * @module WEB, UTIL - * Creates a new ##list#Minified list## by taking an existing list and omitting certain elements from it. You - * can either specify a callback function to approve those items that will be in the new list (all modules), or - * you can pass a value to remove from the new list (Util module only). - * - * If the callback function returns true, the item is shallow-copied in the new list, otherwise it will be removed. - * For values, a simple equality operation (==) will be used. - * - * @example Removing all instances of the number 10 from a list: - *
-     * var list = _([4, 10, 22, 7, 2, 19, 10]).filter(10);
-     * 
- * - * @example Removing all numbers over 10 from a list: - *
-     * var list = _([4, 22, 7, 2, 19]).filter(function(item, index) {
-     *     return item <= 10;
-     * });
-     * 
- * - * @example The previous example with a native array is input. Note that the result is always a ##list#Minified list##: - *
-     * var list = _.filter([4, 22, 7, 2, 19], function(item, index) {
-     *     return item <= 10;
-     * });
-     * 
- * - * @example Creates a list of all unchecked checkboxes on a web page: - *
-     * var list = $('input').filter(function(item, index) {
-     *     return item.getAttribute('type') == 'checkbox' && item.checked;
-     * });
-     * 
- * - * @param list a list to filter. A list to use as input. Can be an array, a ##list#Minified list## or any other array-like structure with - * length property. - * @param filterFunc The filter callback function(item, index) that decides which elements to include: - *
item
The current list element.
- *
index
The second the zero-based index of the current element.
- *
this
The given context if not null. Otherwise the list.
- *
(callback return value)
true to include the item in the new list, false to omit it.
- * @param ctx optional a context to pass to the callback as 'this'. Only supported in UTIL module. - * @param value a value to remove from the list. It will be determined which elements to remove using ==. Must not - * be a function. Requires Util module. - * @return the new, filtered ##list#list## - * - * @see ##only() offers selector-based filtering. - */ - 'filter': listBindArray(filter), - - /*$ - * @id map - * @group LIST - * @requires - * @configurable default - * @name .map() - * @altname _.map() - * @syntax list.map(mapFunc) - * @syntax list.map(mapFunc, ctx) - * @syntax _.map(list, mapFunc) - * @syntax _.map(list, mapFunc, ctx) - * @module UTIL - * Creates a new ##list#Minified list## from the current list using the given callback function. - * The callback is invoked once for each element of the current list. The callback results will be added to the result list. - * - * map() is a simpler version of ##collect(). Unlike collect(), it always creates lists of the same size as the input list, but - * it is easier to use if the resulting list should contain nulls or nested list. - * - * @example Goes through a list of numbers and creates a new list with each value increased by 1: - *
-     * var inced = _(3, 7, 11, 5, 19, 3).map(function(number, index) {
-     *     return number + 1;
-     * });
-     * 
- * - * @example The previous example with a native array is input. Note that the result is always a ##list#Minified list##: - *
-     * var inced = _.map([3, 7, 11, 5, 19, 3], function(number, index) {
-     *     return number + 1;
-     * });
-     * 
- * - * @param list a list to transform. Can be an array, a ##list#Minified list## or any other array-like structure with - * length property. - * @param mapFunc The callback function(item, index) to invoke for each item: - *
item
The current list element.
index
The second the zero-based index of the current element.
- *
this
The given context if not null. Otherwise the list.
- *
(callback return value)
This value will replace the original value in the new list.
- * @param ctx optional a context to pass to the callback as 'this'. - * @return the new ##list#list## - * - * @see ##collect() is a more powerful version of map(). - */ - 'map': listBindArray(map), - - /*$ - * @id find - * @group LIST - * @requires - * @configurable default - * @name .find() - * @altname _.find() - * @syntax list.find(findFunc) - * @syntax list.find(element) - * @syntax list.find(findFunc, startIndex) - * @syntax list.find(element, startIndex) - * @syntax _.find(list, findFunc) - * @syntax _.find(list, element) - * @syntax _.find(list, findFunc, startIndex) - * @syntax _.find(list, element, startIndex) - * @module WEB, UTIL - * Finds a specific value in the list. There are two ways of calling find(): - *
    - *
  1. With a value as argument. Then find() will search for the first occurrence of an identical value in the list, - * using the '===' operator for comparisons, and return the index. If it is not found, - * find() returns undefined.
  2. - *
  3. With a callback function. find() will then call the given function for each list element until the function - * returns a value that is not null or undefined. This value will be returned.
  4. - *
- * - * find() can also be used as an alternative to ##each() if you need to abort the loop. - * - * @example Finds the first negative number in the list: - *
-     * var i = _(1, 2, -4, 5, 2, -1).find(function(value, index) { if (value < 0) return index; }); // returns 2
-     * 
- - * @example Finds the index of the first 5 in the array: - *
-     * var i = _.find([3, 6, 7, 6, 5, 4, 5], 5); // returns 4 (index of first 5)
-     * 
- * - * @example Determines the position of the element with the id '#wanted' among all li elements: - *
-     * var elementIndex = $('li').find($$('#wanted'));
-     * 
- * - * @example Goes through the elements to find the first div that has the class 'myClass', and returns this element: - *
-     * var myClassElement = $('div').find(function(e) { if ($(e).is('.myClass')) return e; });
-     * 
- * - * @param list A list to use as input. Can be an array, a ##list#Minified list## or any other array-like structure with - * length property. - * @param findFunc The callback function(item, index) that will be invoked for every list item until it returns a non-null value: - *
item
The current list element.
index
The second the zero-based index of the current element.
- *
this
This list.
- *
(callback return value)
If the callback returns something other than null or - * undefined, find() will return it directly. Otherwise it will continue.
- * @param element the element to search for - * @param startIndex optional the 0-based index of the first element to search. - * @return if called with an element, either the element's index in the list or undefined if not found. If called with a callback function, - * it returns either the value returned by the callback or undefined. - * - * @see ##findLast() is the equivalent to find() for the list's end. - */ - 'find': listBind(find), - /*$ * @stop */ @@ -2725,74 +2553,12 @@ define('minified', function() { copyObj({ ///#snippet utilUnderscoreFuncs - // @condblock filter - 'filter': funcArrayBind(filter), - // @condend - // @condblock map - 'map': funcArrayBind(map), - // @condend // @condblock each 'each': each, // @condend // @condblock each 'toObject': toObject, // @condend - // @condblock find - 'find': find, - // @condend - - /*$ - * @id keys - * @group OBJECT - * @requires - * @configurable default - * @name _.keys() - * @syntax _.keys(obj) - * @module UTIL - * Creates a ##list#Minified list## containing all property names of the specified object. Only direct properies are - * included, not inherited ones. The order of the keys in the list is undefined and runtime-specific. - * - * @example Using keys(): - *
var obj = {a: 2, b: 52};
-     * var keys = _.keys(obj);  // keys contains ['a', 'b'] now
-     * 
- * - * @param object The object to gather keys from. - * @return A Minified list containing the property names. - * - * @see ##_.values() returns the values of an object as a list. - */ - 'keys': funcArrayBind(keys), - - /*$ - * @id objvalues - * @group OBJECT - * @requires - * @configurable default - * @name _.values() - * @syntax _.values(obj) - * @module UTIL - * Creates a ##list#Minified list## containing all property values of the specified object. Only direct properies are - * included, not inherited ones. The order of the values in the list is undefined and runtime-specific. - * - * @example Using values(): - *
var obj = {a: 2, b: 52};
-     * var values = _.values(obj);  // keys contains [2, 52] now
-     * 
- * - * @param object The object to gather values from. - * @return A Minified list containing the property names. - * - * @see ##_.keys() retrieves the property names of an object as a list. - */ - 'values': funcArrayBind(function(obj, keys) { - var list = []; - if (keys) - each(keys, function(value) { list.push(obj[value]); }); - else - eachObj(obj, function(key, value) { list.push(value); }); - return list; - }), /*$ * @id copyobj @@ -2891,86 +2657,6 @@ define('minified', function() { */ 'eachObj': eachObj, - /*$ - * @id mapobj - * @group OBJECT - * @requires - * @configurable default - * @name _.mapObj() - * @syntax _.mapObj(obj, callback) - * @syntax _.mapObj(obj, callback, ctx) - * @module UTIL - * Creates a new object with the same properties but different values using the given callback function. The function is called - * for each property of the input object to provice a new value for the property. - * - * @example Increases the values of all properties. - *
-     * var r = _.mapObj({a: 1, b: 5, c: 2}, function(key, value) {
-     *     return value + 1;
-     * });
-     * // r is now {a: 2, b: 6, c: 2}
-     * 
- * - * @param obj the object to use - * @param callback The callback function(key, value) to invoke for each property. - *
key
The name of the current property.
- *
value
The value of the current property.
- *
this
The given context. If not set, the object itself.
- *
(callback return value)
This value will replace the original value in the new object.
- * @param ctx optional a context to pass to the callback as 'this'. - * @return the new object - * - * @see ##_.filterObj() filters an object. - * @see ##map() maps a list. - */ - 'mapObj': function(obj, mapFunc, ctx) { - var result = {}; - eachObj(obj, function(key, value) { - result[key] = mapFunc.call(ctx || obj, key, value); - }); - return result; - }, - - /*$ - * @id filterobj - * @group OBJECT - * @requires - * @configurable default - * @name _.filterObj() - * @syntax _.filterObj(obj, filterFunc) - * @syntax _.filterObj(obj, filterFunc, ctx) - * @module UTIL - * Creates a new object that contains only those properties of the input object that have been approved by the filter function. - * - * If the callback function returns true, the property and its value are shallow-copied in the new object, otherwise it will be removed. - * - * @example Removing all values over 10 from an object: - *
-     * var list = _.filterObj({a: 4, b: 22, c: 7, d: 2, e: 19}, function(key, value) {
-     *     return value <= 10;
-     * });
-     * 
- * - * @param obj the object to use - * @param callback The callback function(key, value) to invoke for each property. - *
key
The name of the current property.
- *
value
The value of the current property.
- *
this
The given context. If not set, the object itself.
- *
(callback return value)
true to include the property in the new object, false to omit it.
- * @param ctx optional a context to pass to the callback as 'this'. - * @return the new object - * - * @see ##_.mapObj() can be used to modify the values og an object. - */ - 'filterObj': function(obj, f, ctx) { - var r = {}; - eachObj(obj, function(key, value) { - if (f.call(ctx || obj, key, value)) - r[key] = value; - }); - return r; - }, - /*$ * @id isobject * @group TYPE