MCPcopy
hub / github.com/less/less.js / clone

Function clone

packages/less/lib/less/utils.js:35–43  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

33}
34
35export function clone(obj) {
36 const cloned = {};
37 for (const prop in obj) {
38 if (Object.prototype.hasOwnProperty.call(obj, prop)) {
39 cloned[prop] = obj[prop];
40 }
41 }
42 return cloned;
43}
44
45export function defaults(obj1, obj2) {
46 let newObj = obj2 || {};

Callers 1

runTestSetFunction · 0.50

Calls 1

callMethod · 0.80

Tested by

no test coverage detected