MCPcopy
hub / github.com/webpack/webpack / sortObject

Function sortObject

lib/Compiler.js:151–157  ·  view source on GitHub ↗
(obj, keys)

Source from the content-addressed store, hash-verified

149 * @returns {T} the object with properties sorted by property name
150 */
151const sortObject = (obj, keys) => {
152 const o = /** @type {T} */ ({});
153 for (const k of keys.sort()) {
154 o[k] = obj[k];
155 }
156 return o;
157};
158
159/**
160 * Returns true, if the filename contains any hash.

Callers 1

writeFileMethod · 0.85

Calls 1

sortMethod · 0.80

Tested by

no test coverage detected