VERSION source
+VERSION source
(string): The semantic version number.
diff --git a/add.html b/add.html index 0a8b1a9..03a313b 100644 --- a/add.html +++ b/add.html @@ -392,7 +392,7 @@add source npm
+add source npm
Adds two numbers.
diff --git a/all.html b/all.html index 6cab66b..f72f48d 100644 --- a/all.html +++ b/all.html @@ -6344,62 +6344,60 @@示例
})();debounce source npm
+debounce source npm
Creates a debounced function that delays invoking func
until after wait
-milliseconds have elapsed since the last time the debounced function was
-invoked. The debounced function comes with a cancel
method to cancel
-delayed func
invocations and a flush
method to immediately invoke them.
-Provide an options object to indicate whether func
should be invoked on
-the leading and/or trailing edge of the wait
timeout. The func
is invoked
-with the last arguments provided to the debounced function. Subsequent calls
-to the debounced function return the result of the last func
invocation.
+
创建一个防抖动函数。
+该函数会在 wait
毫秒后调用 func
方法。
+该函数提供一个 cancel
方法取消延迟的函数调用以及 flush
方法立即调用。
+可以提供一个 options
对象决定如何调用 func
方法,
+options.leading 与|或 options.trailing 决定延迟前后如何触发。
+func
会传入最后一次传入的参数给防抖动函数。
+随后调用的防抖动函数返回是最后一次 func
调用的结果。
-注意: If leading
and trailing
options are true
, func
is invoked
-on the trailing edge of the timeout only if the the debounced function is
-invoked more than once during the wait
timeout.
+注意: 如果 leading
和 trailing
都设定为 true。
+则 func 允许 trailing 方式调用的条件为: 在 wait 期间多次调用防抖方法。
-See David Corbacho's article
-for details over the differences between _.debounce
and _.throttle
.
_.debounce
与 _.throttle
的区别。
参数
-
-
- func (Function)
The function to debounce.
+- func (Function)
-要防抖动的函数
- [wait=0] (number)
The number of milliseconds to delay.
+- [wait=0] (number)
-需要延迟的毫秒数
- [options] (Object)
The options object.
+- [options] (Object)
-选项对象
- [options.leading=false] (boolean)
Specify invoking on the leading edge of the timeout.
+- [options.leading=false] (boolean)
-指定调用在延迟开始前
- [options.maxWait] (number)
The maximum time
+func
is allowed to be delayed before it's invoked.- [options.maxWait] (number)
-设置
func
允许被延迟的最大值- [options.trailing=true] (boolean)
Specify invoking on the trailing edge of the timeout.
+- [options.trailing=true] (boolean)
指定调用在延迟结束后
返回值 (Function)
-Returns the new debounced function.
+返回具有防抖动功能的函数
示例
--// avoid costly calculations while the window size is in flux +
@@ -6430,7 +6428,7 @@// 避免窗口在变动时出现昂贵的计算开销。 jQuery(window).on('resize', _.debounce(calculateLayout, 150)); -// invoke `sendMail` when clicked, debouncing subsequent calls +// 当点击时 `sendMail` 随后就被调用。 jQuery(element).on('click', _.debounce(sendMail, 300, { 'leading': true, 'trailing': false })); -// ensure `batchLog` is invoked once after 1 second of debounced calls +// 确保 `batchLog` 调用1次之后,1秒内会被触发。 var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); var source = new EventSource('/stream'); jQuery(source).on('message', debounced); -// cancel a trailing debounced invocation +// 取消一个 trailing 的防抖动调用 jQuery(window).on('popstate', debounced.cancel);
示例
})();defer source npm
+defer source npm
_.defer(func, [args])-Defers invoking the
func
until the current call stack has cleared. Any @@ -6481,7 +6479,7 @@示例
})();delay source npm
+delay source npm
_.delay(func, wait, [args])-Invokes
func
afterwait
milliseconds. Any additional arguments are @@ -6534,7 +6532,7 @@示例
})();flip source npm
+flip source npm
_.flip(func)-Creates a function that invokes
@@ -6584,7 +6582,7 @@func
with arguments reversed.示例
})();memoize source npm
+memoize source npm
_.memoize(func, [resolver])-Creates a function that memoizes the result of
func
. Ifresolver
is @@ -6661,7 +6659,7 @@示例
})();negate source npm
+negate source npm
_.negate(predicate)-Creates a function that negates the result of the predicate
func
. The @@ -6713,7 +6711,7 @@示例
})();once source npm
+once source npm
_.once(func)-Creates a function that is restricted to invoking
func
once. Repeat calls @@ -6763,7 +6761,7 @@示例
})();overArgs source npm
+overArgs source npm
_.overArgs(func, [transforms])-Creates a function that invokes
func
with arguments transformed by @@ -6827,7 +6825,7 @@示例
})();partial source npm
+partial source npm
_.partial(func, [partials])-Creates a function that invokes
func
withpartial
arguments prepended @@ -6895,7 +6893,7 @@示例
})();partialRight source npm
+partialRight source npm
_.partialRight(func, [partials])-This method is like
_.partial
except that partially applied arguments @@ -6962,7 +6960,7 @@示例
})();rearg source npm
+rearg source npm
_.rearg(func, indexes)-Creates a function that invokes
func
with arguments arranged according @@ -7017,7 +7015,7 @@示例
})();rest source npm
+rest source npm
_.rest(func, [start=func.length-1])-Creates a function that invokes
func
with thethis
binding of the @@ -7074,7 +7072,7 @@示例
})();spread source npm
+spread source npm
_.spread(func)-Creates a function that invokes
func
with thethis
binding of the created @@ -7139,7 +7137,7 @@示例
})();throttle source npm
+throttle source npm
_.throttle(func, [wait=0], [options])-Creates a throttled function that only invokes
func
at most once per @@ -7216,7 +7214,7 @@示例
})();unary source npm
+unary source npm
_.unary(func)-Creates a function that accepts up to one argument, ignoring any @@ -7263,7 +7261,7 @@
示例
})();wrap source npm
+wrap source npm
_.wrap(value, wrapper)-Creates a function that provides
value
to the wrapper function as its @@ -7318,7 +7316,7 @@示例
})();clone source npm
+clone source npm
_.clone(value)-Creates a shallow clone of
value
. @@ -7379,7 +7377,7 @@示例
})();cloneDeep source npm
+cloneDeep source npm
_.cloneDeep(value)-This method is like
@@ -7431,7 +7429,7 @@_.clone
except that it recursively clonesvalue
.示例
})();cloneDeepWith source npm
+cloneDeepWith source npm
_.cloneDeepWith(value, [customizer])-This method is like
@@ -7491,7 +7489,7 @@_.cloneWith
except that it recursively clonesvalue
.示例
})();cloneWith source npm
+cloneWith source npm
_.cloneWith(value, [customizer])-This method is like
_.clone
except that it acceptscustomizer
which @@ -7554,7 +7552,7 @@示例
})();eq source npm
+eq source npm
_.eq(value, other)-Performs a
SameValueZero
@@ -7618,7 +7616,7 @@示例
})();gt source npm
+gt source npm
_.gt(value, other)-Checks if
@@ -7672,7 +7670,7 @@value
is greater thanother
.示例
})();gte source npm
+gte source npm
_.gte(value, other)-Checks if
@@ -7726,7 +7724,7 @@value
is greater than or equal toother
.示例
})();isArguments source npm
+isArguments source npm
_.isArguments(value)-Checks if
@@ -7775,7 +7773,7 @@value
is likely anarguments
object.示例
})();isArray source npm
+isArray source npm
_.isArray(value)-Checks if
@@ -7830,7 +7828,7 @@value
is classified as anArray
object.示例
})();isArrayLike source npm
+isArrayLike source npm
_.isArrayLike(value)-Checks if
value
is array-like. A value is considered array-like if it's @@ -7887,7 +7885,7 @@示例
})();isArrayLikeObject source npm
+isArrayLikeObject source npm
_.isArrayLikeObject(value)-This method is like
_.isArrayLike
except that it also checks ifvalue
@@ -7943,7 +7941,7 @@示例
})();isBoolean source npm
+isBoolean source npm
_.isBoolean(value)-Checks if
@@ -7992,7 +7990,7 @@value
is classified as a boolean primitive or object.示例
})();isDate source npm
+isDate source npm
_.isDate(value)-Checks if
@@ -8041,7 +8039,7 @@value
is classified as aDate
object.示例
})();isElement source npm
+isElement source npm
_.isElement(value)-Checks if
@@ -8090,7 +8088,7 @@value
is likely a DOM element.示例
})();isEmpty source npm
+isEmpty source npm
_.isEmpty(value)-Checks if
value
is empty. A value is considered empty unless it's an @@ -8150,7 +8148,7 @@示例
})();isEqual source npm
+isEqual source npm
_.isEqual(value, other)-Performs a deep comparison between two values to determine if they are @@ -8212,7 +8210,7 @@
示例
})();isEqualWith source npm
+isEqualWith source npm
_.isEqualWith(value, other, [customizer])-This method is like
_.isEqual
except that it acceptscustomizer
which is @@ -8278,7 +8276,7 @@示例
})();isError source npm
+isError source npm
_.isError(value)-Checks if
value
is anError
,EvalError
,RangeError
,ReferenceError
, @@ -8328,7 +8326,7 @@示例
})();isFinite source npm
+isFinite source npm
_.isFinite(value)-Checks if
value
is a finite primitive number. @@ -8386,7 +8384,7 @@示例
})();isFunction source npm
+isFunction source npm
_.isFunction(value)-Checks if
@@ -8435,7 +8433,7 @@value
is classified as aFunction
object.示例
})();isInteger source npm
+isInteger source npm
_.isInteger(value)-Checks if
value
is an integer. @@ -8493,7 +8491,7 @@示例
})();isLength source npm
+isLength source npm
_.isLength(value)-Checks if
value
is a valid array-like length. @@ -8551,7 +8549,7 @@示例
})();isMatch source npm
+isMatch source npm
_.isMatch(object, source)-Performs a deep comparison between
object
andsource
to determine if @@ -8608,7 +8606,7 @@示例
})();isMatchWith source npm
+isMatchWith source npm
_.isMatchWith(object, source, [customizer])-This method is like
_.isMatch
except that it acceptscustomizer
which @@ -8674,7 +8672,7 @@示例
})();isNaN source npm
+isNaN source npm
_.isNaN(value)-Checks if
value
isNaN
. @@ -8733,7 +8731,7 @@示例
})();isNative source npm
+isNative source npm
_.isNative(value)-Checks if
@@ -8782,7 +8780,7 @@value
is a native function.示例
})();isNil source npm
+isNil source npm
_.isNil(value)-Checks if
@@ -8834,7 +8832,7 @@value
isnull
orundefined
.示例
})();isNull source npm
+isNull source npm
_.isNull(value)-Checks if
@@ -8883,7 +8881,7 @@value
isnull
.示例
})();isNumber source npm
+isNumber source npm
_.isNumber(value)-Checks if
value
is classified as aNumber
primitive or object. @@ -8942,7 +8940,7 @@示例
})();isObject source npm
+isObject source npm
_.isObject(value)-Checks if
value
is the language type ofObject
. @@ -8998,7 +8996,7 @@示例
})();isObjectLike source npm
+isObjectLike source npm
_.isObjectLike(value)-Checks if
value
is object-like. A value is object-like if it's notnull
@@ -9054,7 +9052,7 @@示例
})();isPlainObject source npm
+isPlainObject source npm
_.isPlainObject(value)-Checks if
value
is a plain object, that is, an object created by the @@ -9114,7 +9112,7 @@示例
})();isRegExp source npm
+isRegExp source npm
_.isRegExp(value)-Checks if
@@ -9163,7 +9161,7 @@value
is classified as aRegExp
object.示例
})();isSafeInteger source npm
+isSafeInteger source npm
_.isSafeInteger(value)-Checks if
value
is a safe integer. An integer is safe if it's an IEEE-754 @@ -9222,7 +9220,7 @@示例
})();isString source npm
+isString source npm
_.isString(value)-Checks if
@@ -9271,7 +9269,7 @@value
is classified as aString
primitive or object.示例
})();isSymbol source npm
+isSymbol source npm
_.isSymbol(value)-Checks if
@@ -9320,7 +9318,7 @@value
is classified as aSymbol
primitive or object.示例
})();isTypedArray source npm
+isTypedArray source npm
_.isTypedArray(value)-Checks if
@@ -9369,7 +9367,7 @@value
is classified as a typed array.示例
})();isUndefined source npm
+isUndefined source npm
_.isUndefined(value)-Checks if
@@ -9418,7 +9416,7 @@value
isundefined
.示例
})();lt source npm
+lt source npm
_.lt(value, other)-Checks if
@@ -9472,7 +9470,7 @@value
is less thanother
.示例
})();lte source npm
+lte source npm
_.lte(value, other)-Checks if
@@ -9526,7 +9524,7 @@value
is less than or equal toother
.示例
})();toArray source npm
+toArray source npm
_.toArray(value)-Converts
@@ -9574,7 +9572,7 @@value
to an array.示例
})();toInteger source npm
+toInteger source npm
_.toInteger(value)-Converts
value
to an integer. @@ -9632,7 +9630,7 @@示例
})();toLength source npm
+toLength source npm
_.toLength(value)-Converts
value
to an integer suitable for use as the length of an @@ -9688,7 +9686,7 @@示例
})();toNumber source npm
+toNumber source npm
_.toNumber(value)-Converts
@@ -9743,7 +9741,7 @@value
to a number.示例
})();toPlainObject source npm
+toPlainObject source npm
_.toPlainObject(value)-Converts
value
to a plain object flattening inherited enumerable @@ -9799,7 +9797,7 @@示例
})();toSafeInteger source npm
+toSafeInteger source npm
_.toSafeInteger(value)-Converts
value
to a safe integer. A safe integer can be compared and @@ -9855,7 +9853,7 @@示例
})();toString source npm
+toString source npm
_.toString(value)-Converts
value
to a string if it's not one. An empty string is returned @@ -9908,7 +9906,7 @@示例
})();add source npm
+add source npm
_.add(augend, addend)-Adds two numbers.
@@ -9956,7 +9954,7 @@示例
})();ceil source npm
+ceil source npm
_.ceil(number, [precision=0])-Computes
@@ -10010,7 +10008,7 @@number
rounded up toprecision
.示例
})();floor source npm
+floor source npm
_.floor(number, [precision=0])-Computes
@@ -10064,7 +10062,7 @@number
rounded down toprecision
.示例
})();max source npm
+max source npm
_.max(array)-Computes the maximum value of
array
. Ifarray
is empty or falsey @@ -10114,7 +10112,7 @@示例
})();maxBy source npm
+maxBy source npm
_.maxBy(array, [iteratee=_.identity])-This method is like
_.max
except that it acceptsiteratee
which is @@ -10173,7 +10171,7 @@示例
})();mean source npm
+mean source npm
_.mean(array)-Computes the mean of the values in
@@ -10219,7 +10217,7 @@array
.示例
})();min source npm
+min source npm
_.min(array)-Computes the minimum value of
array
. Ifarray
is empty or falsey @@ -10269,7 +10267,7 @@示例
})();minBy source npm
+minBy source npm
_.minBy(array, [iteratee=_.identity])-This method is like
_.min
except that it acceptsiteratee
which is @@ -10328,7 +10326,7 @@示例
})();round source npm
+round source npm
_.round(number, [precision=0])-Computes
@@ -10382,7 +10380,7 @@number
rounded toprecision
.示例
})();subtract source npm
+subtract source npm
_.subtract(minuend, subtrahend)-Subtract two numbers.
@@ -10430,7 +10428,7 @@示例
})();sum source npm
+sum source npm
_.sum(array)-Computes the sum of the values in
@@ -10476,7 +10474,7 @@array
.示例
})();sumBy source npm
+sumBy source npm
_.sumBy(array, [iteratee=_.identity])-This method is like
_.sum
except that it acceptsiteratee
which is @@ -10606,7 +10604,7 @@返回值 (number)
})();clamp source npm
+clamp source npm
_.clamp(number, [min], max)-Returns a number whose value is limited to the given range specified @@ -10660,7 +10658,7 @@
示例
})();inRange source npm
+inRange source npm
_.inRange(number, [start=0], end)-Checks if
n
is betweenstart
and up to but not including,end
. If @@ -10731,7 +10729,7 @@示例
})();random source npm
+random source npm
_.random([min=0], [max=1], [floating])-Produces a random number between
min
andmax
(inclusive). If only one @@ -10797,7 +10795,7 @@示例
})();assign source npm
+assign source npm
_.assign(object, [sources])-Assigns own enumerable properties of source objects to the destination @@ -10862,7 +10860,7 @@
示例
})();assignIn extend source npm
+assignIn extend source npm
_.assignIn(object, [sources])-This method is like
_.assign
except that it iterates over own and @@ -10925,7 +10923,7 @@示例
})();assignInWith extendWith source npm
+assignInWith extendWith source npm
_.assignInWith(object, sources, [customizer])-This method is like
_.assignIn
except that it acceptscustomizer
which @@ -10987,7 +10985,7 @@示例
})();assignWith source npm
+assignWith source npm
_.assignWith(object, sources, [customizer])-This method is like
_.assign
except that it acceptscustomizer
which @@ -11049,7 +11047,7 @@示例
})();at source npm
+at source npm
_.at(object, [paths])-Creates an array of values corresponding to
@@ -11102,7 +11100,7 @@paths
ofobject
.示例
})();create source npm
+create source npm
_.create(prototype, [properties])-Creates an object that inherits from the
prototype
object. If aproperties
@@ -11168,7 +11166,7 @@示例
})();defaults source npm
+defaults source npm
_.defaults(object, [sources])-Assigns own and inherited enumerable properties of source objects to the @@ -11222,7 +11220,7 @@
示例
})();defaultsDeep source npm
+defaultsDeep source npm
_.defaultsDeep(object, [sources])-This method is like
_.defaults
except that it recursively assigns @@ -11274,7 +11272,7 @@示例
})();findKey source npm
+findKey source npm
_.findKey(object, [predicate=_.identity])-This method is like
_.find
except that it returns the key of the first @@ -11341,7 +11339,7 @@示例
})();findLastKey source npm
+findLastKey source npm
_.findLastKey(object, [predicate=_.identity])-This method is like
_.findKey
except that it iterates over elements of @@ -11408,7 +11406,7 @@示例
})();forIn source npm
+forIn source npm
_.forIn(object, [iteratee=_.identity])-Iterates over own and inherited enumerable properties of an object invoking @@ -11468,7 +11466,7 @@
示例
})();forInRight source npm
+forInRight source npm
_.forInRight(object, [iteratee=_.identity])-This method is like
_.forIn
except that it iterates over properties of @@ -11526,7 +11524,7 @@示例
})();forOwn source npm
+forOwn source npm
_.forOwn(object, [iteratee=_.identity])-Iterates over own enumerable properties of an object invoking
iteratee
@@ -11586,7 +11584,7 @@示例
})();forOwnRight source npm
+forOwnRight source npm
_.forOwnRight(object, [iteratee=_.identity])-This method is like
_.forOwn
except that it iterates over properties of @@ -11644,7 +11642,7 @@示例
})();functions source npm
+functions source npm
_.functions(object)-Creates an array of function property names from own enumerable properties @@ -11698,7 +11696,7 @@
示例
})();functionsIn source npm
+functionsIn source npm
_.functionsIn(object)-Creates an array of function property names from own and inherited @@ -11752,7 +11750,7 @@
示例
})();get source npm
+get source npm
_.get(object, path, [defaultValue])-Gets the value at
path
ofobject
. If the resolved value is @@ -11811,7 +11809,7 @@示例
})();has source npm
+has source npm
_.has(object, path)-Checks if
@@ -11871,7 +11869,7 @@path
is a direct property ofobject
.示例
})();hasIn source npm
+hasIn source npm
_.hasIn(object, path)-Checks if
@@ -11930,7 +11928,7 @@path
is a direct or inherited property ofobject
.示例
})();invert source npm
+invert source npm
_.invert(object, [multiVal])-Creates an object composed of the inverted keys and values of
object
. @@ -11986,7 +11984,7 @@示例
})();invoke source npm
+invoke source npm
_.invoke(object, path, [args])-Invokes the method at
@@ -12038,7 +12036,7 @@path
ofobject
.示例
})();keys source npm
+keys source npm
_.keys(object)-Creates an array of the own enumerable property names of
object
. @@ -12099,7 +12097,7 @@示例
})();keysIn source npm
+keysIn source npm
_.keysIn(object)-Creates an array of the own and inherited enumerable property names of
object
. @@ -12155,7 +12153,7 @@示例
})();mapKeys source npm
+mapKeys source npm
_.mapKeys(object, [iteratee=_.identity])-The opposite of
_.mapValues
; this method creates an object with the @@ -12207,7 +12205,7 @@示例
})();mapValues source npm
+mapValues source npm
_.mapValues(object, [iteratee=_.identity])-Creates an object with the same keys as
object
and values generated by @@ -12266,7 +12264,7 @@示例
})();merge source npm
+merge source npm
_.merge(object, [sources])-Recursively merges own and inherited enumerable properties of source @@ -12330,7 +12328,7 @@
示例
})();mergeWith source npm
+mergeWith source npm
_.mergeWith(object, sources, customizer)-This method is like
_.merge
except that it acceptscustomizer
which @@ -12400,7 +12398,7 @@示例
})();omit source npm
+omit source npm
_.omit(object, [props])-The opposite of
_.pick
; this method creates an object composed of the @@ -12451,7 +12449,7 @@示例
})();omitBy source npm
+omitBy source npm
_.omitBy(object, [predicate=_.identity])-The opposite of
_.pickBy
; this method creates an object composed of the @@ -12503,7 +12501,7 @@示例
})();pick source npm
+pick source npm
_.pick(object, [props])-Creates an object composed of the picked
@@ -12553,7 +12551,7 @@object
properties.示例
})();pickBy source npm
+pickBy source npm
_.pickBy(object, [predicate=_.identity])-Creates an object composed of the
object
propertiespredicate
returns @@ -12604,7 +12602,7 @@示例
})();result source npm
+result source npm
_.result(object, path, [defaultValue])-This method is like
_.get
except that if the resolved value is a function @@ -12667,7 +12665,7 @@示例
})();set source npm
+set source npm
_.set(object, path, value)-Sets the value at
path
ofobject
. If a portion ofpath
doesn't exist @@ -12727,7 +12725,7 @@示例
})(); - func (Function)