EJSON.addType

Anywhere

EJSON.addType(name, factory)

import { EJSON } from 'meteor/ejson' Source

Add a custom datatype to EJSON.

Arguments

name String

A tag for your custom type; must be unique among custom data types defined in your project, and must match the result of your type's typeName method.

factory Function

A function that deserializes a JSON-compatible value into an instance of your type. This should match the serialization performed by your type's toJSONValue method.

doc_Meteor
2016-05-29 17:20:25
Comments
Leave a Comment

Please login to continue.