code: def _check_valid_version():
      '''
      Check the version of npm to ensure this module will work. Currently
      npm must be at least version 1.2.
      '''
  
      # Locate the full path to npm
      npm_path = salt.utils.path.which('npm')
  
      # pylint: disable=no-member
      res = salt.modules.cmdmod.run('{npm} --version'.format(npm=npm_path), output_loglevel='quiet')
      npm_version, valid_version = _LooseVersion(res), _LooseVersion('1.2')
      # pylint: enable=no-member
      if npm_version < valid_version:
          raise CommandExecutionError(
              '\'npm\' is not recent enough({0} < {1}). Please Upgrade.'.format(
                  npm_version, valid_version
              )
          f _check_valid_version():
      '''
      Check the version of npm to ensure this module will work. Currently
      npm must be at least version 1.2.
      '''
  
      # Locate the full path to npm
      npm_path = salt.utils.path.which('npm')
  
      # pylint: disable=no-member
      res = salt.modules.cmdmod.run('{npm} --version'.format(npm=npm_path), output_loglevel='quiet')
      npm_version, valid_version = _LooseVersion(res), _LooseVersion('1.2')
      # pylint: enable=no-member
      if npm_version < valid_version:
          raise CommandExecutionError(
              '\'npm\' is not recent enough({0} < {1}). Please Upgrade.'.format(
                  npm_version, valid_version
              )
          )
docs: Check the version of npm to ensure this module will work. Currently
      npm must be at least version 1.2.