We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47dd7ff commit 158cfd1Copy full SHA for 158cfd1
json-truncate.d.ts
@@ -0,0 +1,17 @@
1
+export type Options = {
2
+ /** The max depth to build. */
3
+ maxDepth?: number;
4
+ /** What to replace the truncated reference to. */
5
+ replace?: unknown;
6
+ curDepth?: number;
7
+};
8
+
9
+/**
10
+ * Truncates variables.
11
+ * @param obj The object to truncate.
12
+ * @param options If a number, the maxDepth, otherwise configurable options.
13
+ * @returns The truncated object.
14
+ */
15
+declare function truncate<T>(obj: T, options?: Options | number): T;
16
17
+export default truncate;
0 commit comments