Socket
Book a DemoInstallSign in
Socket

ceson

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ceson

Yet another JSON derivative, aimed to be easy to use for humans as well as for low-level tools.

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

CESON: Commented ECMAScript Object Notation

Yet another JSON derivative, aimed to be easy to use for humans as well as for low-level tools.

✨ 📖 ✨ spec ✨ 📖 ✨ example ✨ 📖 ✨

Main features:

  • True subset of ECMAScript.
  • Parser-friendly (block and line) comments.
  • Comma after last value in data containers. (optional)
  • Guaranteed support for UTF-8 BOM.

Related projects:

API

For examples, see test/felidae.js.

.stringify(data)

Return a CESON representation of data as a string.

.parse(ceson[, opts])

Return the data represented by the string ceson if it can be parsed, or undefined in case of a SyntaxError. Other errors are re-thrown.

You can modify the behavior by providing a config object opts. The supported keys are:

  • synErr, othErr: Modify error handling. Documented at module json-parse-pmb since that's used under the hood.

.parseFile(filename, callback)

Try to parse CESON text file filename, then report to callback.

.parseFile(fileOpts, callback)

(no description yet)

.parseCallbackData(readErr, data, callback)

(no description yet)

License

ISC

Keywords

comments

FAQs

Package last updated on 10 Nov 2021

Did you know?

Socket

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.

Install

Related posts