Sha256: 3effd486643c10090c4446ef19def58f3a9f4b2e61988364d17f9c38d657adb0

Contents?: true

Size: 887 Bytes

Versions: 11

Compression:

Stored size: 887 Bytes

Contents

"use strict";

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

function mergeOptions(target, source) {
  for (const k of Object.keys(source)) {
    if ((k === "parserOpts" || k === "generatorOpts" || k === "assumptions") && source[k]) {
      const parserOpts = source[k];
      const targetObj = target[k] || (target[k] = {});
      mergeDefaultFields(targetObj, parserOpts);
    } 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;
  }
}

function isIterableIterator(value) {
  return !!value && typeof value.next === "function" && typeof value[Symbol.iterator] === "function";
}

Version data entries

11 entries across 10 versions & 3 rubygems

Version Path
disco_app-0.16.1 test/dummy/node_modules/@babel/core/lib/config/util.js
disco_app-0.15.2 test/dummy/node_modules/@babel/core/lib/config/util.js
disco_app-0.18.4 test/dummy/node_modules/@babel/core/lib/config/util.js
disco_app-0.18.1 test/dummy/node_modules/@babel/core/lib/config/util.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/@babel/core/lib/config/util.js
disco_app-0.14.0 test/dummy/node_modules/@babel/core/lib/config/util.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/@babel/core/lib/config/util.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/@babel/core/lib/config/util.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/@babel/core/lib/config/util.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/@babel/core/lib/config/util.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/@babel/core/lib/config/util.js