File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,6 @@ var getAllType = function () {
191
191
return result
192
192
}
193
193
194
-
195
194
/**
196
195
* 数字单位格式化
197
196
* @param number
@@ -209,3 +208,18 @@ function formatterNumberUnit (number) {
209
208
}
210
209
return result
211
210
}
211
+
212
+ /**
213
+ * 获取对象长度
214
+ * @param obj
215
+ * @returns {number }
216
+ */
217
+ function getObjectLength ( obj ) {
218
+ var count = 0
219
+ for ( var i in obj ) {
220
+ if ( obj . hasOwnProperty ( i ) ) {
221
+ count ++
222
+ }
223
+ }
224
+ return count
225
+ }
Original file line number Diff line number Diff line change 37
37
- [ 保留小数并千分位格式化] ( /Native-JavaScript/data-handle.js )
38
38
- [ 递归遍历数组对象,将结果去重] ( /Native-JavaScript/data-handle.js )
39
39
- [ 数字单位格式化] ( /Native-JavaScript/data-handle.js )
40
+ - [ 获取对象长度] ( /Native-JavaScript/data-handle.js )
40
41
</details >
41
42
42
43
* <details >
You can’t perform that action at this time.
0 commit comments