DateObjectSerializer.js 268 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 /* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; class DateObjectSerializer { serialize(obj, { write }) { write(obj.getTime()); } deserialize({ read }) { return new Date(read()); } } module.exports = DateObjectSerializer;