Sha256: 21b7efa27f5a34983baf00f4b77aaafc5dbe14fa2487ff371d7319326d682440

Contents?: true

Size: 917 Bytes

Versions: 19

Compression:

Stored size: 917 Bytes

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.mergeOptions = mergeOptions;

function mergeOptions(target, source) {
  for (const k of Object.keys(source)) {
    if (k === "parserOpts" && source.parserOpts) {
      const parserOpts = source.parserOpts;
      const targetObj = target.parserOpts = target.parserOpts || {};
      mergeDefaultFields(targetObj, parserOpts);
    } else if (k === "generatorOpts" && source.generatorOpts) {
      const generatorOpts = source.generatorOpts;
      const targetObj = target.generatorOpts = target.generatorOpts || {};
      mergeDefaultFields(targetObj, generatorOpts);
    } else {
      const val = source[k];
      if (val !== undefined) target[k] = val;
    }
  }
}

function mergeDefaultFields(target, source) {
  for (const k of Object.keys(source)) {
    const val = source[k];
    if (val !== undefined) target[k] = val;
  }
}

Version data entries

19 entries across 19 versions & 5 rubygems

Version Path
disco_app-0.18.0 test/dummy/node_modules/@babel/core/lib/config/util.js
disco_app-0.18.2 test/dummy/node_modules/@babel/core/lib/config/util.js
condenser-0.2 lib/condenser/processors/node_modules/@babel/core/lib/config/util.js
condenser-0.1 lib/condenser/processors/node_modules/@babel/core/lib/config/util.js
condenser-0.0.12 lib/condenser/processors/node_modules/@babel/core/lib/config/util.js
condenser-0.0.11 lib/condenser/processors/node_modules/@babel/core/lib/config/util.js
condenser-0.0.10 lib/condenser/processors/node_modules/@babel/core/lib/config/util.js
condenser-0.0.9 lib/condenser/processors/node_modules/@babel/core/lib/config/util.js
condenser-0.0.8 lib/condenser/processors/node_modules/@babel/core/lib/config/util.js
learn_create-0.0.22 lib/templates/javascript_lab_template/node_modules/@babel/core/lib/config/util.js
jester-data-8.0.0 node_modules/@babel/core/lib/config/util.js
ezii-os-5.2.1 node_modules/@babel/core/lib/config/util.js
ezii-os-2.0.1 node_modules/@babel/core/lib/config/util.js
ezii-os-1.1.0 node_modules/@babel/core/lib/config/util.js
ezii-os-1.0.0 node_modules/@babel/core/lib/config/util.js
condenser-0.0.7 lib/condenser/processors/node_modules/@babel/core/lib/config/util.js
ezii-os-0.0.0.1.0 node_modules/@babel/core/lib/config/util.js
ezii-os-0.0.0.0.1 node_modules/@babel/core/lib/config/util.js
condenser-0.0.5 lib/condenser/processors/node_modules/@babel/core/lib/config/util.js