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

Function copyFromOriginal

packages/less/lib/less/contexts.js:5–13  ·  view source on GitHub ↗
(original, destination, propertiesToCopy)

Source from the content-addressed store, hash-verified

3import * as Constants from './constants.js';
4
5const copyFromOriginal = function copyFromOriginal(original, destination, propertiesToCopy) {
6 if (!original) { return; }
7
8 for (let i = 0; i < propertiesToCopy.length; i++) {
9 if (Object.prototype.hasOwnProperty.call(original, propertiesToCopy[i])) {
10 destination[propertiesToCopy[i]] = original[propertiesToCopy[i]];
11 }
12 }
13};
14
15/*
16 parse is used whilst parsing

Callers 1

contexts.jsFile · 0.85

Calls 1

callMethod · 0.80

Tested by

no test coverage detected