How to use the cson.createCSONString function in cson

To help you get started, we’ve selected a few cson examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github simonknittel / discord-bot-api / src / modules / config.js View on Github external
function save(callback) {
    const csonString = CSON.createCSONString(config);

    fs.writeFile('./config.cson', csonString, (error) => {
        if (error) {
            console.log(chalk.red(error));
            console.log(''); // Empty line
            callback(error);
            return false;
        }

        callback();
    });
}
github madskristensen / WebEssentials2013 / EditorExtensions / Resources / server / services / srv-cson.js View on Github external
Details: err,
            Errors: [{
                Message: err,
                FileName: sourceFileName
            }]
        }));
        writer.end();
        return;
    }

    writer.write(JSON.stringify({
        Success: true,
        SourceFileName: sourceFileName,
        TargetFileName: targetFileName,
        Remarks: "Successful!",
        Content: CSON.createCSONString(data)
    }));
    writer.end();
};
//#endregion

cson

CoffeeScript-Object-Notation Parser. Same as JSON but for CoffeeScript objects.

Artistic-2.0
Latest version published 12 months ago

Package Health Score

66 / 100
Full package analysis