Lines Matching refs:obj

39   var _ = function(obj) {  argument
40 if (obj instanceof _) return obj;
41 if (!(this instanceof _)) return new _(obj);
42 this._wrapped = obj;
99 return function(obj) { argument
101 if (length < 2 || obj == null) return obj;
108 if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];
111 return obj;
126 return function(obj) { argument
127 return obj == null ? void 0 : obj[key];
148 _.each = _.forEach = function(obj, iteratee, context) {
151 if (isArrayLike(obj)) {
152 for (i = 0, length = obj.length; i < length; i++) {
153 iteratee(obj[i], i, obj);
156 var keys = _.keys(obj);
158 iteratee(obj[keys[i]], keys[i], obj);
161 return obj;
165 _.map = _.collect = function(obj, iteratee, context) {
167 var keys = !isArrayLike(obj) && _.keys(obj),
168 length = (keys || obj).length,
172 results[index] = iteratee(obj[currentKey], currentKey, obj);
181 function iterator(obj, iteratee, memo, keys, index, length) { argument
184 memo = iteratee(memo, obj[currentKey], currentKey, obj);
189 return function(obj, iteratee, memo, context) { argument
191 var keys = !isArrayLike(obj) && _.keys(obj),
192 length = (keys || obj).length,
196 memo = obj[keys ? keys[index] : index];
199 return iterator(obj, iteratee, memo, keys, index, length);
211 _.find = _.detect = function(obj, predicate, context) {
213 if (isArrayLike(obj)) {
214 key = _.findIndex(obj, predicate, context);
216 key = _.findKey(obj, predicate, context);
218 if (key !== void 0 && key !== -1) return obj[key];
223 _.filter = _.select = function(obj, predicate, context) {
226 _.each(obj, function(value, index, list) {
233 _.reject = function(obj, predicate, context) { argument
234 return _.filter(obj, _.negate(cb(predicate)), context);
239 _.every = _.all = function(obj, predicate, context) {
241 var keys = !isArrayLike(obj) && _.keys(obj),
242 length = (keys || obj).length;
245 if (!predicate(obj[currentKey], currentKey, obj)) return false;
252 _.some = _.any = function(obj, predicate, context) {
254 var keys = !isArrayLike(obj) && _.keys(obj),
255 length = (keys || obj).length;
258 if (predicate(obj[currentKey], currentKey, obj)) return true;
265 _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {
266 if (!isArrayLike(obj)) obj = _.values(obj);
268 return _.indexOf(obj, item, fromIndex) >= 0;
272 _.invoke = function(obj, method) { argument
275 return _.map(obj, function(value) {
282 _.pluck = function(obj, key) { argument
283 return _.map(obj, _.property(key));
288 _.where = function(obj, attrs) { argument
289 return _.filter(obj, _.matcher(attrs));
294 _.findWhere = function(obj, attrs) { argument
295 return _.find(obj, _.matcher(attrs));
299 _.max = function(obj, iteratee, context) { argument
302 if (iteratee == null && obj != null) {
303 obj = isArrayLike(obj) ? obj : _.values(obj);
304 for (var i = 0, length = obj.length; i < length; i++) {
305 value = obj[i];
312 _.each(obj, function(value, index, list) {
324 _.min = function(obj, iteratee, context) { argument
327 if (iteratee == null && obj != null) {
328 obj = isArrayLike(obj) ? obj : _.values(obj);
329 for (var i = 0, length = obj.length; i < length; i++) {
330 value = obj[i];
337 _.each(obj, function(value, index, list) {
350 _.shuffle = function(obj) { argument
351 var set = isArrayLike(obj) ? obj : _.values(obj);
365 _.sample = function(obj, n, guard) { argument
367 if (!isArrayLike(obj)) obj = _.values(obj);
368 return obj[_.random(obj.length - 1)];
370 return _.shuffle(obj).slice(0, Math.max(0, n));
374 _.sortBy = function(obj, iteratee, context) { argument
376 return _.pluck(_.map(obj, function(value, index, list) {
395 return function(obj, iteratee, context) { argument
398 _.each(obj, function(value, index) {
399 var key = iteratee(value, index, obj);
426 _.toArray = function(obj) { argument
427 if (!obj) return [];
428 if (_.isArray(obj)) return slice.call(obj);
429 if (isArrayLike(obj)) return _.map(obj, _.identity);
430 return _.values(obj);
434 _.size = function(obj) { argument
435 if (obj == null) return 0;
436 return isArrayLike(obj) ? obj.length : _.keys(obj).length;
441 _.partition = function(obj, predicate, context) { argument
444 _.each(obj, function(value, key, obj) { argument
445 (predicate(value, key, obj) ? pass : fail).push(value);
632 _.sortedIndex = function(array, obj, iteratee, context) { argument
634 var value = iteratee(obj);
741 _.bindAll = function(obj) { argument
746 obj[key] = _.bind(obj[key], obj);
748 return obj;
909 function collectNonEnumProps(obj, keys) { argument
911 var constructor = obj.constructor;
916 if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);
920 if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
928 _.keys = function(obj) { argument
929 if (!_.isObject(obj)) return [];
930 if (nativeKeys) return nativeKeys(obj);
932 for (var key in obj) if (_.has(obj, key)) keys.push(key);
934 if (hasEnumBug) collectNonEnumProps(obj, keys);
939 _.allKeys = function(obj) { argument
940 if (!_.isObject(obj)) return [];
942 for (var key in obj) keys.push(key);
944 if (hasEnumBug) collectNonEnumProps(obj, keys);
949 _.values = function(obj) { argument
950 var keys = _.keys(obj);
954 values[i] = obj[keys[i]];
961 _.mapObject = function(obj, iteratee, context) { argument
963 var keys = _.keys(obj),
969 results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
975 _.pairs = function(obj) { argument
976 var keys = _.keys(obj);
980 pairs[i] = [keys[i], obj[keys[i]]];
986 _.invert = function(obj) { argument
988 var keys = _.keys(obj);
990 result[obj[keys[i]]] = keys[i];
997 _.functions = _.methods = function(obj) {
999 for (var key in obj) {
1000 if (_.isFunction(obj[key])) names.push(key);
1013 _.findKey = function(obj, predicate, context) { argument
1015 var keys = _.keys(obj), key;
1018 if (predicate(obj[key], key, obj)) return key;
1024 var result = {}, obj = object, iteratee, keys;
1025 if (obj == null) return result;
1027 keys = _.allKeys(obj);
1031 iteratee = function(value, key, obj) { return key in obj; }; argument
1032 obj = Object(obj);
1036 var value = obj[key];
1037 if (iteratee(value, key, obj)) result[key] = value;
1043 _.omit = function(obj, iteratee, context) { argument
1052 return _.pick(obj, iteratee, context);
1068 _.clone = function(obj) { argument
1069 if (!_.isObject(obj)) return obj;
1070 return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
1076 _.tap = function(obj, interceptor) { argument
1077 interceptor(obj);
1078 return obj;
1085 var obj = Object(object);
1088 if (attrs[key] !== obj[key] || !(key in obj)) return false;
1194 _.isEmpty = function(obj) { argument
1195 if (obj == null) return true;
1196 …if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.leng…
1197 return _.keys(obj).length === 0;
1201 _.isElement = function(obj) { argument
1202 return !!(obj && obj.nodeType === 1);
1207 _.isArray = nativeIsArray || function(obj) {
1208 return toString.call(obj) === '[object Array]';
1212 _.isObject = function(obj) { argument
1213 var type = typeof obj;
1214 return type === 'function' || type === 'object' && !!obj;
1219 _['is' + name] = function(obj) { argument
1220 return toString.call(obj) === '[object ' + name + ']';
1227 _.isArguments = function(obj) { argument
1228 return _.has(obj, 'callee');
1235 _.isFunction = function(obj) { argument
1236 return typeof obj == 'function' || false;
1241 _.isFinite = function(obj) { argument
1242 return isFinite(obj) && !isNaN(parseFloat(obj));
1246 _.isNaN = function(obj) { argument
1247 return _.isNumber(obj) && obj !== +obj;
1251 _.isBoolean = function(obj) { argument
1252 return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
1256 _.isNull = function(obj) { argument
1257 return obj === null;
1261 _.isUndefined = function(obj) { argument
1262 return obj === void 0;
1267 _.has = function(obj, key) { argument
1268 return obj != null && hasOwnProperty.call(obj, key);
1298 _.propertyOf = function(obj) { argument
1299 return obj == null ? function(){} : function(key) {
1300 return obj[key];
1308 return function(obj) { argument
1309 return _.isMatch(obj, attrs);
1472 _.chain = function(obj) { argument
1473 var instance = _(obj);
1485 var result = function(instance, obj) { argument
1486 return instance._chain ? _(obj).chain() : obj;
1490 _.mixin = function(obj) { argument
1491 _.each(_.functions(obj), function(name) {
1492 var func = _[name] = obj[name];
1508 var obj = this._wrapped;
1509 method.apply(obj, arguments);
1510 if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
1511 return result(this, obj);