UNPKG

@craco/craco

Version:

Create React App Configuration Override, an easy and comprehensible configuration layer for create-react-app.

34 lines (27 loc) 583 B
const mergeWith = require("lodash/mergeWith"); function isFunction(value) { return typeof value === "function"; } function isArray(value) { return Array.isArray(value); } function isString(value) { return typeof value === "string"; } function isBoolean(value) { return typeof value === "boolean"; } function deepMergeWithArray(...rest) { return mergeWith(...rest, (x, y) => { if (isArray(x)) { return x.concat(y); } }); } module.exports = { isFunction, isArray, isString, isBoolean, deepMergeWithArray };