cat-bookmarker/assets/node_modules/webpack/lib/serialization/RegExpObjectSerializer.js

18 lines
299 B
JavaScript
Raw Permalink Normal View History

2024-03-10 18:52:04 +00:00
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
class RegExpObjectSerializer {
serialize(obj, { write }) {
write(obj.source);
write(obj.flags);
}
deserialize({ read }) {
return new RegExp(read(), read());
}
}
module.exports = RegExpObjectSerializer;