@orpc/shared 0.0.0-next.cc4cb21 → 0.0.0-next.d0e429d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -0
- package/dist/src/json.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -153,6 +153,9 @@ function parseEmptyableJSON(text) {
|
|
|
153
153
|
}
|
|
154
154
|
return JSON.parse(text);
|
|
155
155
|
}
|
|
156
|
+
function stringifyJSON(value2) {
|
|
157
|
+
return JSON.stringify(value2);
|
|
158
|
+
}
|
|
156
159
|
|
|
157
160
|
// src/value.ts
|
|
158
161
|
function value(value2, ...args) {
|
|
@@ -184,6 +187,7 @@ export {
|
|
|
184
187
|
parseEmptyableJSON,
|
|
185
188
|
retry,
|
|
186
189
|
set,
|
|
190
|
+
stringifyJSON,
|
|
187
191
|
toError,
|
|
188
192
|
trim,
|
|
189
193
|
value
|
package/dist/src/json.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export declare function parseEmptyableJSON(text: string): unknown;
|
|
1
|
+
export declare function parseEmptyableJSON(text: string | null | undefined): unknown;
|
|
2
|
+
export declare function stringifyJSON<T>(value: T): undefined extends T ? undefined | string : string;
|
|
2
3
|
//# sourceMappingURL=json.d.ts.map
|