MCPcopy
hub / github.com/webpack/webpack / serialize

Method serialize

lib/util/LazySet.js:252–256  ·  view source on GitHub ↗

* Serializes the fully materialized set contents into webpack's object * serialization stream. * @param {import("../serialization/ObjectMiddleware").ObjectSerializerContext<(number | T)[]>} context context

({ write })

Source from the content-addressed store, hash-verified

250 * @param {import("../serialization/ObjectMiddleware").ObjectSerializerContext<(number | T)[]>} context context
251 */
252 serialize({ write }) {
253 if (this._needMerge) this._merge();
254 write(this._set.size);
255 for (const item of this._set) write(item);
256 }
257
258 /**
259 * Restores a `LazySet` from serialized item data.

Callers

nothing calls this directly

Calls 2

_mergeMethod · 0.95
writeFunction · 0.85

Tested by

no test coverage detected