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.
Please login to continue.