Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Details: error,
Errors: [{
Message: error,
FileName: sourceFileName
}]
}));
writer.end();
return;
}
writer.write(JSON.stringify({
Success: true,
SourceFileName: sourceFileName,
TargetFileName: targetFileName,
Remarks: "Successful!",
Content: CSON.createJSONString(data)
}));
writer.end();
};
return new Promise((resolve, reject) => {
cson.createJSONString(body, (err, str) => {
if (err) return reject(err);
resolve(str);
});
});
};