MCPcopy
hub / github.com/webpack/webpack / isObjectDefinition

Function isObjectDefinition

lib/DefinePlugin.js:151–155  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

149 * @returns {code is Definitions} true for a plain object or array
150 */
151const isObjectDefinition = (code) =>
152 Boolean(code) &&
153 typeof code === "object" &&
154 !(code instanceof RuntimeValue) &&
155 !(code instanceof RegExp);
156
157/** @typedef {Set<string> | null} ObjKeys */
158/** @typedef {boolean | undefined | null} AsiSafe */

Callers 3

walkDefinitionsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected