How to use the dot-object.overwrite function in dot-object

To help you get started, we’ve selected a few dot-object examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MitocGroup / recink / bin / commands / run / generic.js View on Github external
'use strict';

const dot = require('dot-object');
const path = require('path');
const Recink = require('../../../src/recink');
const { trimBoth } = require('../../../src/helper/util');
const resolvePackage = require('resolve-package');
const ComponentRegistry = require('../component/registry/registry');
const componentsFactory = require('../../../src/component/factory');
const SequentialPromise = require('../../../src/component/helper/sequential-promise');
const ConfigBasedComponent = require('../../../src/component/config-based-component');

dot.overwrite = true;

module.exports = (args, options, logger) => {
  const recink = new Recink();

  let cfg = {};
  let namespace = args.name;
  let disabledComponents = options.s;
  let additionalComponents = options.c;

  if (!Array.isArray(disabledComponents)) {
    disabledComponents = [ disabledComponents ].filter(Boolean);
  }

  if (!Array.isArray(additionalComponents)) {
    additionalComponents = [ additionalComponents ].filter(Boolean);
  }
github MitocGroup / recink / src / container.js View on Github external
'use strict';

const print = require('print');
const dot = require('dot-object');
dot.overwrite = true;

/**
 * Configuration container
 */
class Container {
  /**
   * @param {*} config
   */
  constructor(config = {}) {
    this._config = config;
  }
  
  /**
   * @param {*} config
   *
   * @returns {Container}

dot-object

dot-object makes it possible to transform and read (JSON) objects using dot notation.

MIT
Latest version published 8 months ago

Package Health Score

63 / 100
Full package analysis