Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets.corals.io/wp-content/metras.v32.1/node_modules/rtlcss/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mets.corals.io/wp-content/metras.v32.1/node_modules/rtlcss/lib/config-loader.js
/* global process */
'use strict'
var fs = require('fs')
var path = require('path')
var findup = require('findup')
var stripJSONComments = require('strip-json-comments')
var config = {}
var configSources = ['package.json', '.rtlcssrc', '.rtlcss.json']

module.exports.load = function (configFilePath, cwd, overrides) {
  if (configFilePath) {
    return override(
      JSON.parse(
        stripJSONComments(
          fs.readFileSync(configFilePath, 'utf-8').trim())), overrides)
  }

  var directory = cwd || process.cwd()
  config = loadConfig(directory)
  if (!config) {
    var evns = [process.env.USERPROFILE, process.env.HOMEPATH, process.env.HOME]
    for (var x = 0; x < evns.length; x++) {
      if (!evns[x]) {
        continue
      }
      config = loadConfig(evns[x])
      if (config) {
        break
      }
    }
  }

  if (config) {
    override(config, overrides)
  }
  return config
}

function loadConfig (dir) {
  for (var x = 0; x < configSources.length; x++) {
    var found
    var source = configSources[x]
    try {
      found = findup.sync(dir, source)
    } catch (e) {
      continue
    }

    if (found) {
      var configFilePath = path.normalize(path.join(found, source))
      try {
        config = JSON.parse(
          stripJSONComments(
            fs.readFileSync(configFilePath, 'utf-8').trim()))
      } catch (e) {
        throw new Error(e + ' ' + configFilePath)
      }

      if (source === 'package.json') {
        config = config.rtlcssConfig
      }

      if (config) {
        return config
      }
    }
  }
}

function override (to, from) {
  if (to && from) {
    for (var p in from) {
      if (typeof to[p] === 'object') {
        override(to[p], from[p])
      } else {
        to[p] = from[p]
      }
    }
  }
  return to
}

Spamworldpro Mini