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

8 lines (6 loc) 201 B
import { regExpSerializer } from "./regexp"; describe("RegExp", () => { it("should serialize", () => { expect(regExpSerializer.serialize(/bar/g)).toEqual(["bar", "g"]); }); });