UNPKG

@safejs/serializer

Version:

Serializer is a superset of JSON that includes recursive objects, dates, regular expressions, functions and others which you also can expand by yourself

9 lines 330 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.functionSerializer = void 0; exports.functionSerializer = { determine: (v) => typeof v === "function", serialize: (v) => v.toString(), deserialize: (v) => new Function(`return ${v}`)(), }; //# sourceMappingURL=function.js.map