json output

This commit is contained in:
0xmuralik 2023-03-29 13:12:17 +05:30
parent 277744e52b
commit 85f350dea9

View File

@ -1,7 +1,7 @@
const { execSync } = require("child_process"); const { execSync } = require("child_process");
export const cliTest = (args: any) => { export const cliTest = (args: any) => {
return execSync(`./bin/laconic cns ${args} -o json`).toString(); return JSON.parse(execSync(`./bin/laconic cns ${args}`));
}; };
export function createBond(type: string, quantity: string):string{ export function createBond(type: string, quantity: string):string{