fix(core): update
This commit is contained in:
parent
00ae980fa7
commit
52928e0b9b
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartjson',
|
name: '@push.rocks/smartjson',
|
||||||
version: '5.0.8',
|
version: '5.0.9',
|
||||||
description: 'typed json handlers'
|
description: 'typed json handlers'
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,12 @@ export const stringify = (
|
|||||||
return returnJson;
|
return returnJson;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const stringifyPretty = (objectArg: any) => {
|
||||||
|
const stringified = stringify(objectArg);
|
||||||
|
const object = JSON.parse(stringified);
|
||||||
|
return JSON.stringify(object, null, 2);
|
||||||
|
}
|
||||||
|
|
||||||
export const stringifyBase64 = (...args: Parameters<typeof stringify>): string => {
|
export const stringifyBase64 = (...args: Parameters<typeof stringify>): string => {
|
||||||
const stringifiedResult = stringify(...args);
|
const stringifiedResult = stringify(...args);
|
||||||
return plugins.smartstring.base64.encodeUri(stringifiedResult);
|
return plugins.smartstring.base64.encodeUri(stringifiedResult);
|
||||||
|
Loading…
Reference in New Issue
Block a user