src/utils/skynet-ops.js
// Write JSON to a given MySky instance.
Write JSON to a given MySky instance.
Write JSON to a given MySky instance .
async function writeJsonToMySky(mySkyInstance, filePathToWriteTo, toWriteJson) {
    try {
        const res = await mySkyInstance.setJSON(filePathToWriteTo, toWriteJson);
        console.debug(`Writing JSON to MySky:\n\tfilePathToWriteTo=${filePathToWriteTo}\n\ttoWriteJson=${toWriteJson}\n\t->res=${JSON.stringify(res)}`);
        return res;
    } catch (e) {
        console.error(`Error writing JSON to MySky: ${e.message}`);
    }
}
async function writeJsonToMySky ( mySkyInstance , filePathToWriteTo , toWriteJson ) { try { const res = await mySkyInstance . setJSON ( filePathToWriteTo , toWriteJson ) ; console . debug ( ` \n \t ${ filePathToWriteTo } \n \t ${ toWriteJson } \n \t ${ JSON . stringify ( res ) } ` ) ; return res ; } catch ( e ) { console . error ( ` ${ e . message } ` ) ; } }
Write JSON to a given MySky instance.
Write JSON to a given MySky instance .