How to use the cson.parseCSONString 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 popomore / projj-hooks / lib / utils.js View on Github external
return new Promise((resolve, reject) => {
    cson.parseCSONString(body, (err, str) => {
      if (err) return reject(err);
      resolve(str);
    });
  });
};
github madskristensen / WebEssentials2013 / EditorExtensions / Resources / server / services / srv-cson.js View on Github external
var processCSON2JSON = function (data, sourceFileName, targetFileName, writer) {
    data = CSON.parseCSONString(data);

    if (typeof data === 'Error') {
        var error = "CSON: Invalid CSON content found";

        writer.write(JSON.stringify({
            Success: false,
            SourceFileName: sourceFileName,
            TargetFileName: targetFileName,
            Remarks: error,
            Details: error,
            Errors: [{
                Message: error,
                FileName: sourceFileName
            }]
        }));
        writer.end();

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