MCPcopy Create free account
hub / github.com/microsoft/SandDance / emptyTarget

Function emptyTarget

docs/tests/v2/es6/js/sanddance.js:143379–143381  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

143377}
143378
143379function emptyTarget(val) {
143380 return Array.isArray(val) ? [] : {};
143381}
143382
143383function cloneUnlessOtherwiseSpecified(value, options) {
143384 return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected