MCPcopy
hub / github.com/pmmmwh/react-refresh-webpack-plugin / d

Function d

options/index.js:10–15  ·  view source on GitHub ↗
(object, property, defaultValue)

Source from the content-addressed store, hash-verified

8 * @returns {T[Property]} The defaulted property value.
9 */
10const d = (object, property, defaultValue) => {
11 if (typeof object[property] === 'undefined' && typeof defaultValue !== 'undefined') {
12 object[property] = defaultValue;
13 }
14 return object[property];
15};
16
17/**
18 * Resolves the value for a nested object option.

Callers 2

normalizeOptionsFunction · 0.85
normalizeOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected