MCPcopy Create free account
hub / github.com/breck7/scroll / copyObj

Function copyObj

external/.scrollLibs.js:659–669  ·  view source on GitHub ↗
(obj, target, overwrite)

Source from the content-addressed store, hash-verified

657 }
658
659 function copyObj(obj, target, overwrite) {
660 if (!target) {
661 target = {}
662 }
663 for (var prop in obj) {
664 if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) {
665 target[prop] = obj[prop]
666 }
667 }
668 return target
669 }
670
671 // Counts the column offset in a string, taking tabs into account.
672 // Used mostly to find indentation.

Callers 6

createObjFunction · 0.85
extendModeFunction · 0.85
markTextFunction · 0.85
markTextSharedFunction · 0.85
CodeMirrorFunction · 0.85
fromTextAreaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected