Sha256: c73ae9d08b7c685eda3cbfa6b374704f0fb1c3a5c3212d4aa3a64af03c16b3bc

Contents?: true

Size: 520 Bytes

Versions: 2

Compression:

Stored size: 520 Bytes

Contents

const isArray = (value) => Array.isArray(value)
const isBoolean = (str) => /^true/.test(str) || /^false/.test(str)
const chdirTestApp = () => {
  try {
    return process.chdir('test/test_app')
  } catch (e) {
    return null
  }
}

const chdirCwd = () => process.chdir(process.cwd())

const resetEnv = () => {
  process.env = {}
}

const ensureTrailingSlash = (path) => (path.endsWith('/') ? path : `${path}/`)

module.exports = {
  chdirTestApp,
  chdirCwd,
  isArray,
  isBoolean,
  ensureTrailingSlash,
  resetEnv
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webpacker-6.0.0.pre.2 package/utils/helpers.js
webpacker-6.0.0.pre.1 package/utils/helpers.js