(value, defaultSizeTypes)
| 321 | * @returns {SplitChunksSizes} normalized representation |
| 322 | */ |
| 323 | const normalizeSizes = (value, defaultSizeTypes) => { |
| 324 | if (typeof value === "number") { |
| 325 | /** @type {SplitChunksSizes} */ |
| 326 | const o = {}; |
| 327 | for (const sizeType of defaultSizeTypes) o[sizeType] = value; |
| 328 | return o; |
| 329 | } else if (typeof value === "object" && value !== null) { |
| 330 | return { ...value }; |
| 331 | } |
| 332 | return {}; |
| 333 | }; |
| 334 | |
| 335 | /** |
| 336 | * Merges the provided values into a single result. |
no outgoing calls
no test coverage detected