HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/f/r/e/frenchy/www/french-american.org/current/node_modules/in-publish/index.js
'use strict'
function inCommand (cmd) {
  try {
    var npm_config_argv = JSON.parse(process.env['npm_config_argv'])
  } catch (e) {
    return false
  }

  if (typeof npm_config_argv !== 'object') process.exit(1)
  if (!npm_config_argv.cooked) process.exit(1)
  if (!npm_config_argv.cooked instanceof Array) process.exit(1)

  var V
  while ((V = npm_config_argv.cooked.shift()) !== undefined) {
    if (/^-/.test(V)) continue
    if (cmd.test(V)) return true
    return false
  }
  return false
}

exports.inPublish = function () {
  return inCommand(/^pu(b(l(i(sh?)?)?)?)?$/)
}

exports.inInstall = function () {
  return inCommand(/^i(n(s(t(a(ll?)?)?)?)?)?$/)
}