Sha256: 13e7b5589aeba6db0e18e41d9db4e2247cb9463c8376fa204067efc92aafe10d

Contents?: true

Size: 1.12 KB

Versions: 32

Compression:

Stored size: 1.12 KB

Contents

"use strict";

exports.__esModule = true;
exports.config = undefined;
exports.normaliseOptions = normaliseOptions;

var _parsers = require("./parsers");

var parsers = _interopRequireWildcard(_parsers);

var _config = require("./config");

var _config2 = _interopRequireDefault(_config);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

exports.config = _config2.default;
function normaliseOptions() {
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

  for (var key in options) {
    var val = options[key];
    if (val == null) continue;

    var opt = _config2.default[key];
    if (opt && opt.alias) opt = _config2.default[opt.alias];
    if (!opt) continue;

    var parser = parsers[opt.type];
    if (parser) val = parser(val);

    options[key] = val;
  }

  return options;
}

Version data entries

32 entries across 28 versions & 9 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/babel-core/lib/transformation/file/options/index.js
immosquare-cleaner-0.1.50 node_modules/babel-core/lib/transformation/file/options/index.js
immosquare-cleaner-0.1.49 node_modules/babel-core/lib/transformation/file/options/index.js
immosquare-cleaner-0.1.48 node_modules/babel-core/lib/transformation/file/options/index.js
immosquare-cleaner-0.1.47 node_modules/babel-core/lib/transformation/file/options/index.js
immosquare-cleaner-0.1.46 node_modules/babel-core/lib/transformation/file/options/index.js
immosquare-cleaner-0.1.45 node_modules/babel-core/lib/transformation/file/options/index.js
immosquare-cleaner-0.1.44 node_modules/babel-core/lib/transformation/file/options/index.js
immosquare-cleaner-0.1.43 node_modules/babel-core/lib/transformation/file/options/index.js
immosquare-cleaner-0.1.42 node_modules/babel-core/lib/transformation/file/options/index.js
immosquare-cleaner-0.1.41 node_modules/babel-core/lib/transformation/file/options/index.js
immosquare-cleaner-0.1.40 node_modules/babel-core/lib/transformation/file/options/index.js
ilog-0.4.1 node_modules/babel-core/lib/transformation/file/options/index.js
ilog-0.4.0 node_modules/babel-core/lib/transformation/file/options/index.js
ilog-0.3.3 node_modules/babel-core/lib/transformation/file/options/index.js
optimacms-0.4.3 spec/dummy/node_modules/babel-register/node_modules/babel-core/lib/transformation/file/options/index.js
optimacms-0.4.3 spec/dummy/node_modules/babel-core/lib/transformation/file/options/index.js
optimacms-0.4.3 spec/dummy/node_modules/@rails/webpacker/node_modules/babel-core/lib/transformation/file/options/index.js
optimacms-0.4.2 spec/dummy/node_modules/@rails/webpacker/node_modules/babel-core/lib/transformation/file/options/index.js
optimacms-0.4.2 spec/dummy/node_modules/babel-register/node_modules/babel-core/lib/transformation/file/options/index.js