Browse Source

加object方法

es6
windy 7 years ago
parent
commit
4660423fcd
  1. 16
      dist/bundle.js
  2. 16
      dist/core.js
  3. 16
      dist/fineui.js
  4. 2
      lodash.md
  5. 16
      src/core/lodash.js
  6. 16
      utils/utils.js

16
dist/bundle.js vendored

@ -17941,6 +17941,21 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
return baseRandom(lower, upper); return baseRandom(lower, upper);
} }
// Converts lists into objects. Pass either a single array of `[key, value]`
// pairs, or two parallel arrays of the same length -- one of keys, and one of
// the corresponding values.
function object (list, values) {
var result = {};
for (var i = 0, length = list && list.length; i < length; i++) {
if (values) {
result[list[i]] = values[i];
} else {
result[list[i][0]] = list[i][1];
}
}
return result;
}
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
/** /**
@ -18484,6 +18499,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
lodash.size = size; lodash.size = size;
lodash.some = some; lodash.some = some;
lodash.uniqueId = uniqueId; lodash.uniqueId = uniqueId;
lodash.object = object;
// Add aliases. // Add aliases.
lodash.each = forEach; lodash.each = forEach;

16
dist/core.js vendored

@ -17941,6 +17941,21 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
return baseRandom(lower, upper); return baseRandom(lower, upper);
} }
// Converts lists into objects. Pass either a single array of `[key, value]`
// pairs, or two parallel arrays of the same length -- one of keys, and one of
// the corresponding values.
function object (list, values) {
var result = {};
for (var i = 0, length = list && list.length; i < length; i++) {
if (values) {
result[list[i]] = values[i];
} else {
result[list[i][0]] = list[i][1];
}
}
return result;
}
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
/** /**
@ -18484,6 +18499,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
lodash.size = size; lodash.size = size;
lodash.some = some; lodash.some = some;
lodash.uniqueId = uniqueId; lodash.uniqueId = uniqueId;
lodash.object = object;
// Add aliases. // Add aliases.
lodash.each = forEach; lodash.each = forEach;

16
dist/fineui.js vendored

@ -18142,6 +18142,21 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
return baseRandom(lower, upper); return baseRandom(lower, upper);
} }
// Converts lists into objects. Pass either a single array of `[key, value]`
// pairs, or two parallel arrays of the same length -- one of keys, and one of
// the corresponding values.
function object (list, values) {
var result = {};
for (var i = 0, length = list && list.length; i < length; i++) {
if (values) {
result[list[i]] = values[i];
} else {
result[list[i][0]] = list[i][1];
}
}
return result;
}
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
/** /**
@ -18685,6 +18700,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
lodash.size = size; lodash.size = size;
lodash.some = some; lodash.some = some;
lodash.uniqueId = uniqueId; lodash.uniqueId = uniqueId;
lodash.object = object;
// Add aliases. // Add aliases.
lodash.each = forEach; lodash.each = forEach;

2
lodash.md

@ -1 +1 @@
lodash core plus=debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random lodash core plus=debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,object

16
src/core/lodash.js

@ -8343,6 +8343,21 @@
return baseRandom(lower, upper); return baseRandom(lower, upper);
} }
// Converts lists into objects. Pass either a single array of `[key, value]`
// pairs, or two parallel arrays of the same length -- one of keys, and one of
// the corresponding values.
function object (list, values) {
var result = {};
for (var i = 0, length = list && list.length; i < length; i++) {
if (values) {
result[list[i]] = values[i];
} else {
result[list[i][0]] = list[i][1];
}
}
return result;
}
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
/** /**
@ -8886,6 +8901,7 @@
lodash.size = size; lodash.size = size;
lodash.some = some; lodash.some = some;
lodash.uniqueId = uniqueId; lodash.uniqueId = uniqueId;
lodash.object = object;
// Add aliases. // Add aliases.
lodash.each = forEach; lodash.each = forEach;

16
utils/utils.js

@ -8343,6 +8343,21 @@
return baseRandom(lower, upper); return baseRandom(lower, upper);
} }
// Converts lists into objects. Pass either a single array of `[key, value]`
// pairs, or two parallel arrays of the same length -- one of keys, and one of
// the corresponding values.
function object (list, values) {
var result = {};
for (var i = 0, length = list && list.length; i < length; i++) {
if (values) {
result[list[i]] = values[i];
} else {
result[list[i][0]] = list[i][1];
}
}
return result;
}
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
/** /**
@ -8886,6 +8901,7 @@
lodash.size = size; lodash.size = size;
lodash.some = some; lodash.some = some;
lodash.uniqueId = uniqueId; lodash.uniqueId = uniqueId;
lodash.object = object;
// Add aliases. // Add aliases.
lodash.each = forEach; lodash.each = forEach;

Loading…
Cancel
Save