Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
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.

Source
npmnpm
Version
0.1.2
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[, syntaxErrorSymbol])

Return the data represented by the string ceson if it can be parsed. If it cannot be parsed because of a syntax error, behavior depends on syntaxErrorSymbol, which can be:

  • omitted: Return undefined for easy distinction from valid CESON values like null, false, zero and the empty string.
  • any string or false-y value: Return that value.
  • true: Throw an error.
  • a function: Experimental. Call it with arguments (err, input) and return its result. The input argument might differ from ceson.
  • any other value: Fail in unreliable, mysterious ways.

Errors that cannot be verified to be syntax errors are re-thrown. (Examples might include "cannot allocate buffer" or "too much recursion".)

.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 16 Dec 2016

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