source: trip-planner-front/node_modules/webpack/lib/serialization/DateObjectSerializer.js@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 268 bytes
Line 
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3*/
4
5"use strict";
6
7class DateObjectSerializer {
8 serialize(obj, { write }) {
9 write(obj.getTime());
10 }
11 deserialize({ read }) {
12 return new Date(read());
13 }
14}
15
16module.exports = DateObjectSerializer;
Note: See TracBrowser for help on using the repository browser.