UNPKG

@rickyli79/rich-json

Version:

Serialize and Deserialize javascript objects

24 lines (23 loc) 694 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.URLSerializer = void 0; const lib_1 = require("../lib"); class URLSerializer { static instance; static getInstance() { if (this.instance === undefined) { this.instance = (0, lib_1.createCustomerSerializer)({ class: URL, toContent(value) { return value.toString(); }, fromContent(content) { return new URL(content); }, serializContent: false, }); } return this.instance; } } exports.URLSerializer = URLSerializer;