1.2.7 • Published 3 years ago
@kaviar/ejson v1.2.7
This is EJSON copied and adapted to TypeScript from Meteor. It's a great way to use JSON to pass binaries and serialize/deserialize any type of data with ease.
Install
npm install --save @kaviar/ejson
Documentation
Follow the official documentation here: https://docs.meteor.com/api/ejson.html
Extra
An easy way to transform an object into a class instance.
import { toModel } from "@kaviar/ejson";
class Person {
firstname: string;
lastname: string;
get fullname() {
return `${this.firstname} ${this.lastname}`;
}
}
toModel(Person, {
firstname: "John",
lastname: "Smith",
});
Support
This package is part of KaviarJS family. If you enjoy this work please show your support by starring the main package. If not, let us know what can we do to deserve it, our feedback form is here