UNPKG

packme-js

Version:

Blazing fast binary serialization via auto-generated classes from simple JSON manifest files.

26 lines (19 loc) 400 B
// This class describes object field of type datetime. import Field from '../field.js'; export default class DateTimeField extends Field { constructor(node, tag, manifest) { super(node, tag, manifest); } get type() { return 'Date'; } get size() { return 8; } packer(name = '') { return `this.$packDateTime(this.${name})`; } unpacker() { return `this.$unpackDateTime()`; } }