MCPcopy Create free account
hub / github.com/zxlie/FeHelper / _getAllKeysCount

Function _getAllKeysCount

apps/json-format/content-script.js:1292–1307  ·  view source on GitHub ↗
(json)

Source from the content-addressed store, hash-verified

1290 * @private
1291 */
1292 let _getAllKeysCount = function (json) {
1293 let count = 0;
1294
1295 if (typeof json === 'object') {
1296 let keys = Object.keys(json);
1297 count += keys.length;
1298
1299 keys.forEach(key => {
1300 if (json[key] && typeof json[key] === 'object') {
1301 count += _getAllKeysCount(json[key]);
1302 }
1303 });
1304 }
1305
1306 return count;
1307 };
1308
1309 // 用新的options来覆盖默认options
1310 let _extendsOptions = options => {

Callers 1

_formatTheSourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected