-
<static> can(obj, funcName) → {boolean}
-
判断对象是否可响应指定方法
Parameters:
Name |
Type |
Description |
obj |
string
|
|
funcName |
string
|
|
Returns:
-
Type
-
boolean
-
<static> clone(obj, deep) → {Object}
-
clone克隆指定对象,如果对象自己有clone方法,则调用对象自己的clone方法
Parameters:
Name |
Type |
Argument |
Default |
Description |
obj |
Object
|
|
|
被克隆的对象 |
deep |
boolean
|
<optional>
|
false
|
是否深度克隆 |
Returns:
-
Type
-
Object
-
<static> eachAll(obj, fn)
-
遍历对象,调用指定函数
Parameters:
Name |
Type |
Description |
obj |
string
|
|
fn |
function
|
|
-
<static> eachOwn(obj, fn)
-
遍历对象拥有的成员,调用指定函数
Parameters:
Name |
Type |
Description |
obj |
string
|
|
fn |
function
|
|
-
<static> eachProp(obj, fn)
-
遍历对象的属性(除方法外的所有成员),调用指定函数
Parameters:
Name |
Type |
Description |
obj |
string
|
|
fn |
function
|
|
-
<static> has(obj, property) → {boolean}
-
判断对象是否拥有指定属性,该属性不能为function
Parameters:
Name |
Type |
Description |
obj |
string
|
|
property |
string
|
|
Returns:
-
Type
-
boolean
-
<static> isPrivate(name) → {boolean}
-
判断name是否符合私有成员的名称规范
Parameters:
Name |
Type |
Description |
name |
string
|
|
Returns:
-
Type
-
boolean
-
<static> isProtected(name) → {boolean}
-
判断name是否符合受保护成员的名称规范
Parameters:
Name |
Type |
Description |
name |
string
|
|
Returns:
-
Type
-
boolean
-
<static> isPublic(name) → {boolean}
-
判断name是否符合公开成员的名称规范
Parameters:
Name |
Type |
Description |
name |
string
|
|
Returns:
-
Type
-
boolean
-
<static> merge(obj) → {Object}
-
依次合并给定的所有对象到一个新的对象
Parameters:
Name |
Type |
Argument |
Description |
obj |
Object
|
<repeatable>
|
|
Returns:
new object, merge
-
Type
-
Object
-
<static> mix(obj, src, whitelist) → {Object}
-
copy members from src to obj
Parameters:
Name |
Type |
Argument |
Default |
Description |
obj |
Object
|
|
|
[description] |
src |
Object
|
|
|
[description] |
whitelist |
String[]
|
<optional>
|
null
|
不想被覆盖的成员 |
Returns:
-
Type
-
Object
-
<static> traverseChain(obj, prop, fn) → {boolean}
-
根据指定属性来追溯
Parameters:
Name |
Type |
Description |
obj |
Object
|
对象 |
prop |
String
|
属性名 |
fn |
function
|
处理函数(追溯到的对象) |
Returns:
全部处理完返回true,否则false
-
Type
-
boolean