Skip to content

Commit 31c20f9

Browse files
committed
chore: remove commented test code.
1 parent 63e638d commit 31c20f9

File tree

1 file changed

+0
-76
lines changed

1 file changed

+0
-76
lines changed

src/utils/index.ts

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -171,79 +171,3 @@ export function stringToAutoType(source: string): unknown {
171171
}
172172
return value;
173173
}
174-
175-
// function jsonFlattenNext(data: JSONDataType, path = 'root'): JSONFlattenReturnType[] {
176-
// function test(content: unknown, path: string, level: number, options: JSONFlattenOptions) {
177-
// const { type = 'content', key, index, showComma, length } = options || {};
178-
// return {
179-
// content,
180-
// level,
181-
// key,
182-
// index,
183-
// path,
184-
// showComma,
185-
// length,
186-
// type,
187-
// };
188-
// }
189-
190-
// let endObj = {} as Record<string, unknown>;
191-
// let i = 0;
192-
// let output: any = [data];
193-
// let startArr = [];
194-
// while (output.length || endObj[i]) {
195-
// if (i && endObj[i]) {
196-
// const k = endObj[i];
197-
// delete endObj[i];
198-
// startArr.push(k);
199-
// i++;
200-
// } else {
201-
// const now = output.shift();
202-
// if (Array.isArray(now)) {
203-
// startArr.push(
204-
// test('[', path, 0, {
205-
// type: 'arrayStart',
206-
// showComma: false,
207-
// length: now.length,
208-
// }),
209-
// );
210-
// output = now.concat(output);
211-
// Object.keys(endObj)
212-
// .sort((a, b) => Number(b) - Number(a))
213-
// .forEach(id => {
214-
// endObj[Number(id) + now.length + 1] = endObj[id];
215-
// delete endObj[id];
216-
// });
217-
// endObj[i + now.length] = ']';
218-
// } else if (typeof now === 'object') {
219-
// startArr.push(
220-
// test('{', path, 0, {
221-
// type: 'objectStart',
222-
// showComma: false,
223-
// length: Object.keys(now).length,
224-
// }),
225-
// );
226-
// output = Object.keys(now)
227-
// .map(key => now[key])
228-
// .concat(output);
229-
// Object.keys(endObj)
230-
// .sort((a, b) => Number(b) - Number(a))
231-
// .forEach(id => {
232-
// endObj[Number(id) + Object.keys(now).length + 1] = endObj[id];
233-
// delete endObj[id];
234-
// });
235-
// endObj[i + Object.keys(now).length] = '}';
236-
// } else {
237-
// startArr.push(
238-
// test(now, path, 0, {
239-
// type: 'content',
240-
// showComma: false,
241-
// length: 0,
242-
// }),
243-
// );
244-
// }
245-
// }
246-
// }
247-
248-
// return startArr as any;
249-
// }

0 commit comments

Comments
 (0)