Lines Matching refs:obj

41   var _ = function(obj) {  argument
42 if (obj instanceof _) return obj;
43 if (!(this instanceof _)) return new _(obj);
44 this._wrapped = obj;
142 return function(obj) { argument
143 return obj == null ? void 0 : obj[key];
164 _.each = _.forEach = function(obj, iteratee, context) {
167 if (isArrayLike(obj)) {
168 for (i = 0, length = obj.length; i < length; i++) {
169 iteratee(obj[i], i, obj);
172 var keys = _.keys(obj);
174 iteratee(obj[keys[i]], keys[i], obj);
177 return obj;
181 _.map = _.collect = function(obj, iteratee, context) {
183 var keys = !isArrayLike(obj) && _.keys(obj),
184 length = (keys || obj).length,
188 results[index] = iteratee(obj[currentKey], currentKey, obj);
197 var reducer = function(obj, iteratee, memo, initial) { argument
198 var keys = !isArrayLike(obj) && _.keys(obj),
199 length = (keys || obj).length,
202 memo = obj[keys ? keys[index] : index];
207 memo = iteratee(memo, obj[currentKey], currentKey, obj);
212 return function(obj, iteratee, memo, context) { argument
214 return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
226 _.find = _.detect = function(obj, predicate, context) {
227 var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey;
228 var key = keyFinder(obj, predicate, context);
229 if (key !== void 0 && key !== -1) return obj[key];
234 _.filter = _.select = function(obj, predicate, context) {
237 _.each(obj, function(value, index, list) {
244 _.reject = function(obj, predicate, context) { argument
245 return _.filter(obj, _.negate(cb(predicate)), context);
250 _.every = _.all = function(obj, predicate, context) {
252 var keys = !isArrayLike(obj) && _.keys(obj),
253 length = (keys || obj).length;
256 if (!predicate(obj[currentKey], currentKey, obj)) return false;
263 _.some = _.any = function(obj, predicate, context) {
265 var keys = !isArrayLike(obj) && _.keys(obj),
266 length = (keys || obj).length;
269 if (predicate(obj[currentKey], currentKey, obj)) return true;
276 _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {
277 if (!isArrayLike(obj)) obj = _.values(obj);
279 return _.indexOf(obj, item, fromIndex) >= 0;
283 _.invoke = restArgs(function(obj, method, args) { argument
285 return _.map(obj, function(value) {
292 _.pluck = function(obj, key) { argument
293 return _.map(obj, _.property(key));
298 _.where = function(obj, attrs) { argument
299 return _.filter(obj, _.matcher(attrs));
304 _.findWhere = function(obj, attrs) { argument
305 return _.find(obj, _.matcher(attrs));
309 _.max = function(obj, iteratee, context) { argument
312 …if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object') && obj != null)…
313 obj = isArrayLike(obj) ? obj : _.values(obj);
314 for (var i = 0, length = obj.length; i < length; i++) {
315 value = obj[i];
322 _.each(obj, function(v, index, list) {
334 _.min = function(obj, iteratee, context) { argument
337 …if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object') && obj != null)…
338 obj = isArrayLike(obj) ? obj : _.values(obj);
339 for (var i = 0, length = obj.length; i < length; i++) {
340 value = obj[i];
347 _.each(obj, function(v, index, list) {
359 _.shuffle = function(obj) { argument
360 return _.sample(obj, Infinity);
367 _.sample = function(obj, n, guard) { argument
369 if (!isArrayLike(obj)) obj = _.values(obj);
370 return obj[_.random(obj.length - 1)];
372 var sample = isArrayLike(obj) ? _.clone(obj) : _.values(obj);
386 _.sortBy = function(obj, iteratee, context) { argument
389 return _.pluck(_.map(obj, function(value, key, list) {
408 return function(obj, iteratee, context) { argument
411 _.each(obj, function(value, index) {
412 var key = iteratee(value, index, obj);
440 _.toArray = function(obj) { argument
441 if (!obj) return [];
442 if (_.isArray(obj)) return slice.call(obj);
443 if (_.isString(obj)) {
445 return obj.match(reStrSymbol);
447 if (isArrayLike(obj)) return _.map(obj, _.identity);
448 return _.values(obj);
452 _.size = function(obj) { argument
453 if (obj == null) return 0;
454 return isArrayLike(obj) ? obj.length : _.keys(obj).length;
646 _.sortedIndex = function(array, obj, iteratee, context) { argument
648 var value = iteratee(obj);
771 _.bindAll = restArgs(function(obj, keys) { argument
777 obj[key] = _.bind(obj[key], obj);
946 var collectNonEnumProps = function(obj, keys) { argument
948 var constructor = obj.constructor;
953 if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);
957 if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
965 _.keys = function(obj) { argument
966 if (!_.isObject(obj)) return [];
967 if (nativeKeys) return nativeKeys(obj);
969 for (var key in obj) if (_.has(obj, key)) keys.push(key);
971 if (hasEnumBug) collectNonEnumProps(obj, keys);
976 _.allKeys = function(obj) { argument
977 if (!_.isObject(obj)) return [];
979 for (var key in obj) keys.push(key);
981 if (hasEnumBug) collectNonEnumProps(obj, keys);
986 _.values = function(obj) { argument
987 var keys = _.keys(obj);
991 values[i] = obj[keys[i]];
998 _.mapObject = function(obj, iteratee, context) { argument
1000 var keys = _.keys(obj),
1005 results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
1011 _.pairs = function(obj) { argument
1012 var keys = _.keys(obj);
1016 pairs[i] = [keys[i], obj[keys[i]]];
1022 _.invert = function(obj) { argument
1024 var keys = _.keys(obj);
1026 result[obj[keys[i]]] = keys[i];
1033 _.functions = _.methods = function(obj) {
1035 for (var key in obj) {
1036 if (_.isFunction(obj[key])) names.push(key);
1043 return function(obj) { argument
1045 if (defaults) obj = Object(obj);
1046 if (length < 2 || obj == null) return obj;
1053 if (!defaults || obj[key] === void 0) obj[key] = source[key];
1056 return obj;
1068 _.findKey = function(obj, predicate, context) { argument
1070 var keys = _.keys(obj), key;
1073 if (predicate(obj[key], key, obj)) return key;
1078 var keyInObj = function(value, key, obj) { argument
1079 return key in obj;
1083 _.pick = restArgs(function(obj, keys) { argument
1085 if (obj == null) return result;
1088 keys = _.allKeys(obj);
1092 obj = Object(obj);
1096 var value = obj[key];
1097 if (iteratee(value, key, obj)) result[key] = value;
1103 _.omit = restArgs(function(obj, keys) { argument
1114 return _.pick(obj, iteratee, context);
1130 _.clone = function(obj) { argument
1131 if (!_.isObject(obj)) return obj;
1132 return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
1138 _.tap = function(obj, interceptor) { argument
1139 interceptor(obj);
1140 return obj;
1147 var obj = Object(object);
1150 if (attrs[key] !== obj[key] || !(key in obj)) return false;
1269 _.isEmpty = function(obj) { argument
1270 if (obj == null) return true;
1271 …if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.leng…
1272 return _.keys(obj).length === 0;
1276 _.isElement = function(obj) { argument
1277 return !!(obj && obj.nodeType === 1);
1282 _.isArray = nativeIsArray || function(obj) {
1283 return toString.call(obj) === '[object Array]';
1287 _.isObject = function(obj) { argument
1288 var type = typeof obj;
1289 return type === 'function' || type === 'object' && !!obj;
1294 _['is' + name] = function(obj) { argument
1295 return toString.call(obj) === '[object ' + name + ']';
1302 _.isArguments = function(obj) { argument
1303 return _.has(obj, 'callee');
1311 _.isFunction = function(obj) { argument
1312 return typeof obj == 'function' || false;
1317 _.isFinite = function(obj) { argument
1318 return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));
1322 _.isNaN = function(obj) { argument
1323 return _.isNumber(obj) && isNaN(obj);
1327 _.isBoolean = function(obj) { argument
1328 return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
1332 _.isNull = function(obj) { argument
1333 return obj === null;
1337 _.isUndefined = function(obj) { argument
1338 return obj === void 0;
1343 _.has = function(obj, key) { argument
1344 return obj != null && hasOwnProperty.call(obj, key);
1374 _.propertyOf = function(obj) { argument
1375 return obj == null ? function(){} : function(key) {
1376 return obj[key];
1384 return function(obj) { argument
1385 return _.isMatch(obj, attrs);
1549 _.chain = function(obj) { argument
1550 var instance = _(obj);
1562 var chainResult = function(instance, obj) { argument
1563 return instance._chain ? _(obj).chain() : obj;
1567 _.mixin = function(obj) { argument
1568 _.each(_.functions(obj), function(name) {
1569 var func = _[name] = obj[name];
1586 var obj = this._wrapped;
1587 method.apply(obj, arguments);
1588 if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
1589 return chainResult(this, obj);