How to use the @node-minify/utils.utils.clone function in @node-minify/utils

To help you get started, we’ve selected a few @node-minify/utils 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 srod / node-minify / packages / core / src / setup.js View on Github external
const setup = inputSettings => {
  let settings = Object.assign(utils.clone(defaultSettings), inputSettings);

  // In memory
  if (settings.content) {
    checkMandatoriesMemoryContent(inputSettings);
    return settings;
  }

  checkMandatories(inputSettings);

  settings = Object.assign(settings, wildcards(settings.input, settings.publicFolder));
  settings = Object.assign(
    settings,
    checkOutput(settings.input, settings.output, settings.publicFolder, settings.replaceInPlace)
  );
  settings = Object.assign(settings, setPublicFolder(settings.input, settings.publicFolder));