Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
CoffeeScript-Object-Notation Parser. Same as JSON but for CoffeeScript objects.
Everyone knows JSON, it's the thing that looks like this:
{
"abc": [
"a",
"b",
"c"
],
"a": {
"b": "c"
}
}
But with the invention of CoffeeScript you can also write the same thing in CSON which looks like this:
{
abc: [
'a'
'b'
'c'
]
a:
b: 'c'
}
Which is far more leniant than JSON, nicer to write and read, and won't fail if you forget a comma.
Install CSON
npm install cson
With Node.js in JavaScript
// Include CSON
require('coffee-script');
CSON = require('cson');
// Parse a file
CSON.parseFile('data.cson', function(err,obj){});
// Parse a string
CSON.parse(dataStr, function(err,obj){});
// Stringify an object
CSON.stringify(data, function(err,str){});
With Node.js in CoffeeScript
# Include CSON
CSON = require 'cson'
# Parse a file
CSON.parseFile 'data.cson', (err,obj) ->
# Parse a string
CSON.parse dataStr, (err,obj) ->
# Stringify an object
CSON.stringify data, (err,str) ->
To learn more about CSON visit its wiki here
Licensed under the MIT License Copyright 2011 Benjamin Arthur Lupton
FAQs
CoffeeScript-Object-Notation Parser. Same as JSON but for CoffeeScript objects.
The npm package cson receives a total of 58,635 weekly downloads. As such, cson popularity was classified as popular.
We found that cson demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.