MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / copyObj

Function copyObj

static/plugins/codemirror/addon/runmode/runmode.node.js:3–9  ·  view source on GitHub ↗
(obj, target, overwrite)

Source from the content-addressed store, hash-verified

1'use strict';
2
3function copyObj(obj, target, overwrite) {
4 if (!target) { target = {}; }
5 for (var prop in obj)
6 { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))
7 { target[prop] = obj[prop]; } }
8 return target
9}
10
11// Counts the column offset in a string, taking tabs into account.
12// Used mostly to find indentation.

Callers 2

createObjFunction · 0.70
extendModeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected