Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ejson

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ejson

EJSON - Extended and Extensible JSON library from Meteor made compatible for Nodejs and Browserif

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

ejson

Build Status NPM version

ejson is an extension of JSON to support more types. It supports all JSON-safe types as well as

  • Date: It maintains a date instance instead of transforming it to a string.
  • Binary: Uinit8Array
  • User defined types

The ejson module is port of Meteor's EJSON parser which has been made compatible for Node.js and browsers. This way, other real-time libraries can also make use of these extensions.

Installation

The module is released through npm:

npm install --save ejson

Usage

The API is exactly the same as the API that Meteor provides as it uses exactly the same code. The most important API's are:

  • EJSON.clone
  • EJSON.parse
  • EJSON.stringify

And some utility methods:

  • EJSON.toJSONValue
  • EJSON.fromJSONValue
  • EJSON.isBinary
  • EJSON.newBinary
  • EJSON.equals

See the meteor EJSON documentation for more detailed information.

License

This module is licensed under MIT. Same as Meteor.js is.

Keywords

FAQs

Package last updated on 16 Jul 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc