MCPcopy
hub / github.com/hotoo/pinyin / compact

Function compact

lib/util.js:77–89  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

75}
76
77function compact(arr) {
78 if (arr.length === 0) {
79 return [];
80 }
81 if (arr.length === 1) {
82 return [arr[0]];
83 }
84 let result = compact2array(arr[0], arr[1]);
85 for (let i = 2, l = arr.length; i < l; ++i) {
86 result = compact2array(result, arr[i]);
87 }
88 return result;
89}
90
91exports.combo2array = combo2array;
92exports.combo = combo;

Callers

nothing calls this directly

Calls 1

compact2arrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…