-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
60 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# at | ||
|
||
获取`数组`中指定索引的元素,支持负索引。 | ||
获取 `数组` 中指定索引的元素,支持负索引。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# find | ||
|
||
在`数组`中查找`第一个`或`最后一个`满足指定条件的元素,返回该元素及其索引。 | ||
在 `数组` 中查找 `第一个` 或 `最后一个` 满足指定条件的元素,返回该元素及其索引。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# normalizeToArray | ||
|
||
将值转换为`数组`,如果输入已经是数组,则直接返回输入值。 | ||
将值转换为 `数组`,如果输入已经是数组,则直接返回输入值。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# removeItem | ||
|
||
从`数组`中移除`第一次`出现的指定元素,返回移除的元素。 | ||
从 `数组` 中移除 `第一次` 出现的指定元素,返回移除的元素。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# shuffle | ||
|
||
随机打乱`数组`中的元素。 | ||
随机打乱 `数组` 中的元素。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# sumBy | ||
|
||
根据提供的函数计算`数组`中各项值的和。 | ||
根据提供的函数计算 `数组` 中各项值的和。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# sum | ||
|
||
计算数字`数组`中各项值的和。 | ||
计算数字 `数组` 中各项值的和。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# toggleItem | ||
|
||
根据元素是否在`数组`中,将其添加到数组`末尾`或从数组中移除。 | ||
根据元素是否在 `数组` 中,将其添加到数组 `末尾` 或从数组中移除。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# uniqBy | ||
|
||
使用自定义比较函数返回去重后的`数组`。 | ||
使用自定义比较函数返回去重后的 `数组`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# uniq | ||
|
||
返回去重后的`数组`。 | ||
返回去重后的 `数组`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# debounce | ||
|
||
创建一个防抖函数,该函数会从上一次被调用后,延迟`delay`毫秒后调用`fn`方法。 | ||
创建一个防抖函数,该函数会从上一次被调用后,延迟 `delay` 毫秒后调用 `fn` 方法。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# hasOwn | ||
|
||
判断对象是否具有某个`自有(非继承)`属性。 | ||
判断对象是否具有某个 `自有(非继承)` 属性。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# inBrowser | ||
|
||
判断代码是否在`浏览器环境`中运行。 | ||
判断代码是否在 `浏览器环境` 中运行。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# inMobile | ||
|
||
判断代码是否在`移动浏览器环境`中运行。 | ||
判断代码是否在 `移动浏览器环境` 中运行。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isArrayBuffer | ||
|
||
判断输入值是否是`ArrayBuffer`。 | ||
判断输入值是否是 `ArrayBuffer`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isBoolean | ||
|
||
判断输入值是否是`布尔值`。 | ||
判断输入值是否是 `布尔值`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isDataView | ||
|
||
判断输入值是否是`DataView`。 | ||
判断输入值是否是 `DataView`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isFunction | ||
|
||
判断输入值是否是`函数`。 | ||
判断输入值是否是 `函数`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isNonEmptyArray | ||
|
||
判断输入值是否为`非空数组`。 | ||
判断输入值是否为 `非空数组`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isNumber | ||
|
||
判断输入值是否是`数字`。 | ||
判断输入值是否是 `数字`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isNumeric | ||
|
||
判断输入值是否是`数字`或`数字字符串`。 | ||
判断输入值是否是 `数字` 或 `数字字符串`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isObject | ||
|
||
判断输入值是否是`对象`(不包括 `null`)。 | ||
判断输入值是否是 `对象`(不包括 `null`)。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isPlainObject | ||
|
||
判断输入值是否是`普通对象`。 | ||
判断输入值是否是 `普通对象`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isString | ||
|
||
判断输入值是否是`字符串`。 | ||
判断输入值是否是 `字符串`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isSymbol | ||
|
||
判断输入值是否是`符号`。 | ||
判断输入值是否是 `符号`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isTruthy | ||
|
||
判断输入值是否为`真值`。 | ||
判断输入值是否为 `真值`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isTypedArray | ||
|
||
判断输入值是否是`TypedArray`。 | ||
判断输入值是否是 `TypedArray`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isWeakMap | ||
|
||
判断输入值是否是`WeakMap`。 | ||
判断输入值是否是 `WeakMap`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# isWeakSet | ||
|
||
判断输入值是否是`WeakSet`。 | ||
判断输入值是否是 `WeakSet`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# supportTouch | ||
|
||
判断当前环境是否支持`触摸事件`。 | ||
判断当前环境是否支持 `触摸事件`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# toRawType | ||
|
||
返回输入值的`原始类型`。 | ||
返回输入值的 `原始类型`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# toTypeString | ||
|
||
返回输入值的`类型字符串`。 | ||
返回输入值的 `类型字符串`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# meanBy | ||
|
||
通过对`数组`的每个元素应用一个函数以得出数值,计算数组的平均值。 | ||
通过对 `数组` 的每个元素应用一个函数以得出数值,计算数组的平均值。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# sample | ||
|
||
从`数组`中返回一个随机元素。如果数组为空,则返回 `undefined`。 | ||
从 `数组` 中返回一个随机元素。如果数组为空,则返回 `undefined`。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# sumBy | ||
|
||
根据提供的函数计算`数组`中各项值的和。 | ||
根据提供的函数计算 `数组` 中各项值的和。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# sum | ||
|
||
计算数字`数组`中各项值的和。 | ||
计算数字 `数组` 中各项值的和。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# ensurePrefix | ||
|
||
确保`字符串`存在某个前缀,如果不存在则添加该前缀。 | ||
确保 `字符串` 存在某个前缀,如果不存在则添加该前缀。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# ensureSuffix | ||
|
||
确保`字符串`存在某个后缀,如果不存在则添加该后缀。 | ||
确保 `字符串` 存在某个后缀,如果不存在则添加该后缀。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# genStringKey | ||
|
||
生成一个唯一的`字符串键`,通过递增数字值并将其转换为字符串。 | ||
生成一个唯一的 `字符串键`,通过递增数字值并将其转换为字符串。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# lowerFirst | ||
|
||
将`字符串`的`首字母`小写,其余部分保持不变。 | ||
将 `字符串` 的 `首字母` 小写,其余部分保持不变。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# upperFirst | ||
|
||
将`字符串`的`首字母`大写,其余部分保持不变。 | ||
将 `字符串` 的 `首字母` 大写,其余部分保持不变。 | ||
|
||
### 使用 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# copyText | ||
|
||
复制文本到剪贴板 | ||
复制文本到剪贴板。 | ||
|
||
### 用法 | ||
|
||
|