{"title":"CSON","name":"cson","version":"8.4.0-next.1703862812.379264c2ac0b97044b8ec4d95d965bda9f823898","license":"Artistic-2.0","description":"CoffeeScript-Object-Notation Parser. Same as JSON but for CoffeeScript objects.","homepage":"https://github.com/bevry/cson","funding":"https://bevry.me/fund","repository":{"type":"git","url":"git+https://github.com/bevry/cson.git"},"bugs":{"url":"https://github.com/bevry/cson/issues"},"keywords":["coffeescript","cson","esnext","javascript","node","parse","stringify"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"cson","githubSlug":"bevry/cson","npmPackageName":"cson"}},"author":{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"authors":["Benjamin Lupton <b@lupton.cc> (https://balupton.com) (https://github.com/balupton): Accelerating collaborative wisdom."],"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Attila Oláh","email":"atl@google.com","url":"https://attilaolah.eu"},{"name":"Attila Oláh","email":"attilaolah@google.com","url":"https://attilaolah.eu"},{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},{"name":"Claudius Nicolae","email":"claudius.nicolae@gmail.com","url":"https://github.com/clyfe"},{"name":"evinugur","url":"https://github.com/evinugur"},{"name":"Jason Karns","email":"jason.karns@gmail.com","url":"https://jasonkarns.com"},{"name":"Joël Perras","email":"joel@nerderati.com","url":"https://nerderati.com"},{"name":"Linus G Thiel","email":"linus@hanssonlarsson.se","url":"https://yesbabyyes.se"},{"name":"Rob Loach","email":"robloach@gmail.com","url":"https://robloach.net"},{"name":"Ryan LeFevre","email":"meltingice8917@gmail.com","url":"https://github.com/meltingice"},{"name":"Tushar Kant","email":"me@tushar.works","url":"https://github.com/nanuclickity"},{"name":"Zearin","url":"https://github.com/Zearin"},{"name":"ZHANG Cheng","email":"czhang.oss@gmail.com","url":"https://github.com/zhangcheng"}],"sponsors":["Andrew Nesbitt (https://nesbitt.io) (https://github.com/andrew): Software engineer and researcher","Balsa <hello@balsa.com> (https://balsa.com) (https://github.com/balsa): We're Balsa, and we're building tools for builders.","Codecov <hello-codecov@sentry.io> (https://codecov.io) (https://github.com/codecov): Empower developers with tools to improve code quality and testing.","Poonacha Medappa (https://poonachamedappa.com) (https://github.com/km-Poonacha)","Rob Morris <rob@prismatik.com.au> (https://github.com/Rob-Morris)","Sentry (https://sentry.io) (https://github.com/getsentry): Real-time crash reporting for your web apps, mobile apps, and games.","Syntax <scott@syntax.fm> (https://syntax.fm) (https://github.com/syntaxfm): Syntax Podcast"],"donors":["Andrew Nesbitt (https://nesbitt.io) (https://github.com/andrew)","Armen Mkrtchian (https://mogoni.dev) (https://github.com/Armenm)","Balsa <hello@balsa.com> (https://balsa.com) (https://github.com/balsa)","Chad (https://opencollective.com/chad8)","Codecov <hello-codecov@sentry.io> (https://codecov.io) (https://github.com/codecov)","dr.dimitru (https://veliovgroup.com) (https://github.com/dr-dimitru)","Elliott Ditman (https://elliottditman.com) (https://github.com/elliottditman)","entroniq (https://gitlab.com/entroniq) (https://thanks.dev/d/gl/entroniq)","GitHub (https://github.com/about) (https://github.com/github)","Hunter Beast (https://cryptoquick.com) (https://github.com/cryptoquick)","Jean-Luc Geering (https://github.com/jlgeering) (https://opencollective.com/jlgeering) (https://twitter.com/jlgeering)","Michael Duane Mooring (https://mdm.cc) (https://github.com/mikeumus) (https://opencollective.com/mikeumus) (https://twitter.com/mikeumus)","Michael Harry Scepaniak <mhs1.sys@gmail.com> (https://michaelscepaniak.com) (https://github.com/hispanic)","Mohammed Shah <shah@idk.uno> (https://github.com/smashah) (https://thanks.dev/d/gh/smashah) (https://twitter.com/smashah)","Mr. Henry <hello@mrhenry.be> (https://mrhenry.be) (https://github.com/mrhenry)","Nermal <nermalcat69@skiff.com> (https://arjunaditya.vercel.app) (https://github.com/nermalcat69)","Pleo (https://pleo.io) (https://github.com/pleo-io)","Poonacha Medappa (https://poonachamedappa.com) (https://github.com/km-Poonacha)","Rob Morris <rob@prismatik.com.au> (https://github.com/Rob-Morris)","Robert de Forest <guitar.robot@gmail.com> (https://github.com/rdeforest)","Sentry (https://sentry.io) (https://github.com/getsentry)","ServieJS (https://github.com/serviejs) (https://thanks.dev/d/gh/serviejs)","Skunk Team (https://skunk.team) (https://github.com/skunkteam)","Syntax <scott@syntax.fm> (https://syntax.fm) (https://github.com/syntaxfm)","WriterJohnBuck (https://github.com/WriterJohnBuck)"],"engines":{"node":">=6"},"editions":[{"description":"CoffeeScript source code with Require for modules","directory":"source","entry":"index.coffee","tags":["source","coffeescript","require"],"engines":false},{"description":"CoffeeScript compiled for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21"}}],"bin":{"cson":"bin.cjs","cson2json":"bin.cjs","json2cson":"bin.cjs"},"type":"commonjs","main":"edition-esnext/index.js","dependencies":{"cson-parser":"^4.0.9","extract-opts":"^5.8.0","requirefresh":"^5.13.0","safefs":"^8.9.0"},"devDependencies":{"assert-helpers":"^11.12.0","coffeelint":"^2.1.0","coffeescript":"^2.7.0","kava":"^7.8.0","projectz":"^4.1.1","safeps":"^11.6.0","valid-directory":"^4.8.0"},"scripts":{"our:bin":"node ./bin.cjs","our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-esnext","our:compile:edition-esnext":"coffee -bco ./edition-esnext ./source && printf '%s' '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:projectz","our:meta:projectz":"projectz --offline","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:coffeelint","our:verify:coffeelint":"coffeelint ./source","test":"node ./edition-esnext/test.js"},"testen":{"serial":true},"_id":"cson@8.4.0-next.1703862812.379264c2ac0b97044b8ec4d95d965bda9f823898","readme":"<!-- TITLE/ -->\n\n# CSON\n\n<!-- /TITLE -->\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/cson/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/cson/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/cson\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/cson.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/cson\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/cson.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n\nCoffeeScript-Object-Notation. Same as JSON but for CoffeeScript objects.\n\n[Projects using CSON.](https://www.npmjs.org/browse/depended/cson)\n\n[Projects using CSON Parser directly.](https://www.npmjs.org/browse/depended/cson-parser)\n\nSince v2, this CSON package is a higher-level wrapper around the lower-level [CSON Parser](https://www.npmjs.com/package/cson-parser).\n\n\n\n\n\n## What is CSON?\n\nEveryone knows JSON, it's the thing that looks like this:\n\n``` javascript\n{\n  \"greatDocumentaries\": [\n    \"earthlings.com\",\n    \"forksoverknives.com\",\n    \"cowspiracy.com\"\n  ],\n  \"importantFacts\": {\n    \"emissions\": \"Livestock and their byproducts account for at least 32,000 million tons of carbon dioxide (CO2) per year, or 51% of all worldwide greenhouse gas emissions.\\nGoodland, R Anhang, J. “Livestock and Climate Change: What if the key actors in climate change were pigs, chickens and cows?”\\nWorldWatch, November/December 2009. Worldwatch Institute, Washington, DC, USA. Pp. 10–19.\\nhttp://www.worldwatch.org/node/6294\",\n    \"landuse\": \"Livestock covers 45% of the earth’s total land.\\nThornton, Phillip, Mario Herrero, and Polly Ericksen. “Livestock and Climate Change.” Livestock Exchange, no. 3 (2011).\\nhttps://cgspace.cgiar.org/bitstream/handle/10568/10601/IssueBrief3.pdf\",\n    \"burger\": \"One hamburger requires 660 gallons of water to produce – the equivalent of 2 months’ worth of showers.\\nCatanese, Christina. “Virtual Water, Real Impacts.” Greenversations: Official Blog of the U.S. EPA. 2012.\\nhttp://blog.epa.gov/healthywaters/2012/03/virtual-water-real-impacts-world-water-day-2012/\\n“50 Ways to Save Your River.” Friends of the River.\\nhttp://www.friendsoftheriver.org/site/PageServer?pagename=50ways\",\n    \"milk\": \"1,000 gallons of water are required to produce 1 gallon of milk.\\n“Water trivia facts.” United States Environmental Protection Agency.\\nhttp://water.epa.gov/learn/kids/drinkingwater/water_trivia_facts.cfm#_edn11\",\n    \"more\": \"http://cowspiracy.com/facts\"\n  }\n}\n```\n\nNow let's write the same thing in CSON:\n\n``` coffeescript\n# Comments!!!\n\n# An Array with no commas!\ngreatDocumentaries: [\n\t'earthlings.com'\n\t'forksoverknives.com'\n\t'cowspiracy.com'\n]\n\n# An Object without braces!\nimportantFacts:\n\t# Multi-Line Strings! Without Quote Escaping!\n\temissions: '''\n\t\tLivestock and their byproducts account for at least 32,000 million tons of carbon dioxide (CO2) per year, or 51% of all worldwide greenhouse gas emissions.\n\t\tGoodland, R Anhang, J. “Livestock and Climate Change: What if the key actors in climate change were pigs, chickens and cows?”\n\t\tWorldWatch, November/December 2009. Worldwatch Institute, Washington, DC, USA. Pp. 10–19.\n\t\thttp://www.worldwatch.org/node/6294\n\t\t'''\n\n\tlanduse: '''\n\t\tLivestock covers 45% of the earth’s total land.\n\t\tThornton, Phillip, Mario Herrero, and Polly Ericksen. “Livestock and Climate Change.” Livestock Exchange, no. 3 (2011).\n\t\thttps://cgspace.cgiar.org/bitstream/handle/10568/10601/IssueBrief3.pdf\n\t\t'''\n\n\tburger: '''\n\t\tOne hamburger requires 660 gallons of water to produce – the equivalent of 2 months’ worth of showers.\n\t\tCatanese, Christina. “Virtual Water, Real Impacts.” Greenversations: Official Blog of the U.S. EPA. 2012.\n\t\thttp://blog.epa.gov/healthywaters/2012/03/virtual-water-real-impacts-world-water-day-2012/\n\t\t“50 Ways to Save Your River.” Friends of the River.\n\t\thttp://www.friendsoftheriver.org/site/PageServer?pagename=50ways\n\t\t'''\n\n\tmilk: '''\n\t\t1,000 gallons of water are required to produce 1 gallon of milk.\n\t\t“Water trivia facts.” United States Environmental Protection Agency.\n\t\thttp://water.epa.gov/learn/kids/drinkingwater/water_trivia_facts.cfm#_edn11\n\t\t'''\n\n\tmore: 'http://cowspiracy.com/facts'\n```\n\nWhich is far more lenient than JSON, way nicer to write and read, no need to quote and escape everything, has comments and readable multi-line strings, and won't fail if you forget a comma.\n\n\n\n## Using CSON\n\n### Via the Command Line\n\nUse CSON with the command line with:\n\n``` bash\n# Convert a JSON file into a CSON file\njson2cson in.json > out.cson\n# Same thing via piping\ncat in.json | json2cson > out.cson\n\n# Convert a CSON file into a JSON file\ncson2json in.cson > out.json\n# Same thing via piping\ncat in.cson | cson2json > out.json\n```\n\nRequires a global CSON install: `npm install -g cson`\n\n\n### Via the API\n\nInclude CSON:\n\n``` javascript\nvar CSON = require('cson')\n```\n\nEach method can be executed without a callback like so:\n\n``` javascript\nvar result = CSON.createCSONString({a:{b:'c'}}, {/* optional options argument */})\nif ( result instanceof Error ) {\n\tconsole.log(result.stack)\n} else {\n\tconsole.log(result)\n}\n```\n\nOr via a callback like so:\n\n``` javascript\nCSON.createCSONString({a:{b:'c'}}, {/* optional options argument */}, function(err,result){\n\tconsole.log(err, result)\n})\n```\n\nExecuting the method with a callback still executes the method synchronously.\n\nClick the below function names to open more detailed documentation.\n\n\n#### Create Strings\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#stringify-instance'>String <strong>CSON.stringify</strong>(data, replacer?, indent?)</a> <br/> Converts an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> into a CSON <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#createCSONString-instance'>String <strong>CSON.createCSONString</strong>(data, opts?, next?)</a> <br/> Converts an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> into a CSON <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#createJSONString-instance'>String <strong>CSON.createJSONString</strong>(data, opts?, next?)</a> <br/> Converts an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> into a JSON <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#createString-instance'>String <strong>CSON.createString</strong>(data, opts?, next?)</a> <br/> Converts an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> into a <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> of the desired format If the format option is not specified, we default to CSON\n\n\n### Parse Strings\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#parse-instance'>Object <strong>CSON.parse</strong>(data, opts?, next?)</a> <br/> Parses a CSON <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#parseCSONString-instance'>Object <strong>CSON.parseCSONString</strong>(data, opts?, next?)</a> <br/> Parses a CSON <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#parseJSONString-instance'>Object <strong>CSON.parseJSONString</strong>(data, opts?, next?)</a> <br/> Parses a JSON <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#parseCSString-instance'>Object <strong>CSON.parseCSString</strong>(data, opts?, next?)</a> <br/> Parses a CoffeeScript <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#parseJSString-instance'>Object <strong>CSON.parseJSString</strong>(data, opts?, next?)</a> <br/> Parses a JavaScript <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#parseString-instance'>Object <strong>CSON.parseString</strong>(data, opts?, next?)</a> <br/> Converts a <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> of the desired format into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> If the format option is not specified, we default to CSON\n\n\n#### Parse Files\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#load-instance'>Object <strong>CSON.load</strong>(filePath, opts?, next?)</a> <br/> Parses a CSON file into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#parseCSONFile-instance'>Object <strong>CSON.parseCSONFile</strong>(filePath, opts?, next?)</a> <br/> Parses a CSON file into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#parseJSONFile-instance'>Object <strong>CSON.parseJSONFile</strong>(filePath, opts?, next?)</a> <br/> Parses a JSON file into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#parseCSFile-instance'>Object <strong>CSON.parseCSFile</strong>(filePath, opts?, next?)</a> <br/> Parses a CoffeeScript file into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#parseJSFile-instance'>Object <strong>CSON.parseJSFile</strong>(filePath, opts?, next?)</a> <br/> Parses a JavaScript file into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#parseFile-instance'>Object <strong>CSON.parseFile</strong>(filePath, opts?, next?)</a> <br/> Parses a file path of the desired format into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> If the format option is not specified, we use the filename to detect what it should be, otherwise we default to CSON\n\n\n### Require Files\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#requireCSFile-instance'>Object <strong>CSON.requireCSFile</strong>(filePath, opts?, next?)</a> <br/> Requires a CoffeeScript file and returns the result <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#requireJSFile-instance'>Object <strong>CSON.requireJSFile</strong>(filePath, opts?, next?)</a> <br/> Requires a JavaScript file and returns the result <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a>\n\n- <a href='http://master.cson.bevry.surge.sh/docs/classes/CSON.html#requireFile-instance'>Object <strong>CSON.requireFile</strong>(filePath, opts?, next?)</a> <br/> Requires or parses a file path of the desired format into an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> If the format option is not specified, we use the filename to detect what it should be, otherwise we default to parsing CSON\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<!-- INSTALL/ -->\n\n## Install\n\n### [npm](https://npmjs.com \"npm is a package manager for javascript\")\n\n#### Install Globally\n\n-   Install: `npm install --global cson`\n-   Executables: `cson`, `cson2json`, `json2cson`\n\n#### Install Locally\n\n-   Install: `npm install --save cson`\n-   Executables: `npx cson`, `npx cson2json`, `npx json2cson`\n-   Import: `import * as pkg from ('cson')`\n-   Require: `const pkg = require('cson')`\n\n### [Editions](https://editions.bevry.me \"Editions are the best way to produce and consume packages you care about.\")\n\nThis package is published with the following editions:\n-   `cson/source/index.coffee` is [CoffeeScript](https://coffeescript.org \"CoffeeScript is a little language that compiles into JavaScript\") source code with [Require](https://nodejs.org/dist/latest-v5.x/docs/api/modules.html \"Node/CJS Modules\") for modules\n-   `cson` aliases `cson/edition-esnext/index.js`\n-   `cson/edition-esnext/index.js` is [CoffeeScript](https://coffeescript.org \"CoffeeScript is a little language that compiles into JavaScript\") compiled for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with [Require](https://nodejs.org/dist/latest-v5.x/docs/api/modules.html \"Node/CJS Modules\") for modules\n\n<!-- /INSTALL -->\n\n<!-- HISTORY/ -->\n\n## History\n\n[Discover the release history by heading on over to the `HISTORY.md` file.](https://github.com/bevry/cson/blob/HEAD/HISTORY.md#files)\n\n<!-- /HISTORY -->\n\n<!-- BACKERS/ -->\n\n## Backers\n\n### Code\n\n[Discover how to contribute via the `CONTRIBUTING.md` file.](https://github.com/bevry/cson/blob/HEAD/CONTRIBUTING.md#files)\n\n#### Authors\n\n-   [Benjamin Lupton](https://balupton.com) — Accelerating collaborative wisdom.\n\n#### Maintainers\n\n-   [Benjamin Lupton](https://balupton.com) — Accelerating collaborative wisdom.\n\n#### Contributors\n\n-   [Attila Oláh](https://github.com/attilaolah) — [view contributions](https://github.com/bevry/cson/commits?author=attilaolah \"View the GitHub contributions of Attila Oláh on repository bevry/cson\")\n-   [Attila Oláh](https://attilaolah.eu)\n-   [Benjamin Lupton](https://github.com/balupton) — [view contributions](https://github.com/bevry/cson/commits?author=balupton \"View the GitHub contributions of Benjamin Lupton on repository bevry/cson\")\n-   [Claudius Nicolae](https://github.com/clyfe) — [view contributions](https://github.com/bevry/cson/commits?author=clyfe \"View the GitHub contributions of Claudius Nicolae on repository bevry/cson\")\n-   [evinugur](https://github.com/evinugur) — [view contributions](https://github.com/bevry/cson/commits?author=evinugur \"View the GitHub contributions of evinugur on repository bevry/cson\")\n-   [Jason Karns](https://github.com/jasonkarns) — [view contributions](https://github.com/bevry/cson/commits?author=jasonkarns \"View the GitHub contributions of Jason Karns on repository bevry/cson\")\n-   [Joël Perras](https://github.com/jperras) — [view contributions](https://github.com/bevry/cson/commits?author=jperras \"View the GitHub contributions of Joël Perras on repository bevry/cson\")\n-   [Linus G Thiel](https://github.com/linus) — [view contributions](https://github.com/bevry/cson/commits?author=linus \"View the GitHub contributions of Linus G Thiel on repository bevry/cson\")\n-   [Rob Loach](https://github.com/RobLoach) — [view contributions](https://github.com/bevry/cson/commits?author=RobLoach \"View the GitHub contributions of Rob Loach on repository bevry/cson\")\n-   [Ryan LeFevre](https://github.com/meltingice) — [view contributions](https://github.com/bevry/cson/commits?author=meltingice \"View the GitHub contributions of Ryan LeFevre on repository bevry/cson\")\n-   [Tushar Kant](https://github.com/nanuclickity) — [view contributions](https://github.com/bevry/cson/commits?author=nanuclickity \"View the GitHub contributions of Tushar Kant on repository bevry/cson\")\n-   [Zearin](https://github.com/Zearin) — [view contributions](https://github.com/bevry/cson/commits?author=Zearin \"View the GitHub contributions of Zearin on repository bevry/cson\")\n-   [ZHANG Cheng](https://github.com/zhangcheng) — [view contributions](https://github.com/bevry/cson/commits?author=zhangcheng \"View the GitHub contributions of ZHANG Cheng on repository bevry/cson\")\n\n### Finances\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n#### Sponsors\n\n-   [Andrew Nesbitt](https://nesbitt.io) — Software engineer and researcher\n-   [Balsa](https://balsa.com) — We're Balsa, and we're building tools for builders.\n-   [Codecov](https://codecov.io) — Empower developers with tools to improve code quality and testing.\n-   [Poonacha Medappa](https://poonachamedappa.com)\n-   [Rob Morris](https://github.com/Rob-Morris)\n-   [Sentry](https://sentry.io) — Real-time crash reporting for your web apps, mobile apps, and games.\n-   [Syntax](https://syntax.fm) — Syntax Podcast\n\n#### Donors\n\n-   [Andrew Nesbitt](https://nesbitt.io)\n-   [Armen Mkrtchian](https://mogoni.dev)\n-   [Balsa](https://balsa.com)\n-   [Chad](https://opencollective.com/chad8)\n-   [Codecov](https://codecov.io)\n-   [dr.dimitru](https://veliovgroup.com)\n-   [Elliott Ditman](https://elliottditman.com)\n-   [entroniq](https://gitlab.com/entroniq)\n-   [GitHub](https://github.com/about)\n-   [Hunter Beast](https://cryptoquick.com)\n-   [Jean-Luc Geering](https://github.com/jlgeering)\n-   [Michael Duane Mooring](https://mdm.cc)\n-   [Michael Harry Scepaniak](https://michaelscepaniak.com)\n-   [Mohammed Shah](https://github.com/smashah)\n-   [Mr. Henry](https://mrhenry.be)\n-   [Nermal](https://arjunaditya.vercel.app)\n-   [Pleo](https://pleo.io)\n-   [Poonacha Medappa](https://poonachamedappa.com)\n-   [Rob Morris](https://github.com/Rob-Morris)\n-   [Robert de Forest](https://github.com/rdeforest)\n-   [Sentry](https://sentry.io)\n-   [ServieJS](https://github.com/serviejs)\n-   [Skunk Team](https://skunk.team)\n-   [Syntax](https://syntax.fm)\n-   [WriterJohnBuck](https://github.com/WriterJohnBuck)\n\n<!-- /BACKERS -->\n\n<!-- LICENSE/ -->\n\n## License\n\nUnless stated otherwise all works are:\n\n-   Copyright &copy; [Benjamin Lupton](https://balupton.com)\n\nand licensed under:\n\n-   [Artistic License 2.0](http://spdx.org/licenses/Artistic-2.0.html)\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"379264c2ac0b97044b8ec4d95d965bda9f823898","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-T40CnYiRSzeLPb5V3O1CydrZ9yRXfMU+KaBPSLm0JqT67gYDHTXSdaOINtaBHOO7z28+WDf1vnuMBismQVvL/A==","shasum":"b4334c48cdec71cdbe21892eb823a9f4d37c2be5","tarball":"http://registry-npm.ywwl.com/cson/download/cson-8.4.0-next.1703862812.379264c2ac0b97044b8ec4d95d965bda9f823898.tgz","fileCount":11,"unpackedSize":87618,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHFc0c/h1t8yINqXku6NDmiAMs8APVivdPEYree8t/T3AiAQRvDusybVXvMyLjXXWEarw6RnjBokYzQ8oeAwoGEoqw=="}],"size":18196,"noattachment":false,"key":"/cson/-/cson-8.4.0-next.1703862812.379264c2ac0b97044b8ec4d95d965bda9f823898.tgz"},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cson_8.4.0-next.1703862812.379264c2ac0b97044b8ec4d95d965bda9f823898_1703862870867_0.53601724507983"},"_hasShrinkwrap":false,"publish_time":1703862871080,"_cnpm_publish_time":1703862871080,"dist-tags":{"latest":"8.4.0","next":"8.4.0-next.1703862812.379264c2ac0b97044b8ec4d95d965bda9f823898"}}