<commit_before>module Docs
  class Npm < UrlScraper
    self.name = 'npm'
    self.type = 'npm'
    self.version = '3.3.6'
    self.base_url = 'https://docs.npmjs.com/'
    self.links = {
      home: 'https://www.npmjs.com/',
      code: 'https://github.com/npm/npm'
    }

    html_filters.push 'npm/entries', 'npm/clean_html', 'title'

    options[:container] = ->(filter) { filter.root_page? ? '.toc' : nil }
    options[:title] = false
    options[:root_title] = 'npm'

    options[:skip] = %w(all)
    options[:skip_patterns] = [
      /\Aenterprise/,
      /\Acompany/,
      /\Apolicies/
    ]

    options[:attribution] = <<-HTML
      &copy; npm, Inc. and Contributors<br>
      Licensed under the npm License.<br>
      npm is a trademark of npm, Inc.
    HTML
  end
end<commit_msg>Update npm documentation (3.4.1)<commit_after>module Docs
  class Npm < UrlScraper
    self.name = 'npm'
    self.type = 'npm'
    self.version = '3.4.1'
    self.base_url = 'https://docs.npmjs.com/'
    self.links = {
      home: 'https://www.npmjs.com/',
      code: 'https://github.com/npm/npm'
    }

    html_filters.push 'npm/entries', 'npm/clean_html', 'title'

    options[:container] = ->(filter) { filter.root_page? ? '.toc' : nil }
    options[:title] = false
    options[:root_title] = 'npm'

    options[:skip] = %w(all misc/index)
    options[:skip_patterns] = [
      /\Aenterprise/,
      /\Acompany/,
      /\Apolicies/
    ]

    options[:attribution] = <<-HTML
      &copy; npm, Inc. and Contributors<br>
      Licensed under the npm License.<br>
      npm is a trademark of npm, Inc.
    HTML
  end
end
{'fraction_non_alphanumeric': 0.1654275092936803, 'fraction_numerical': 0.0055762081784386614, 'mean_word_length': 2.3786610878661087, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6853475', 'n_tokens_mistral': 619, 'n_tokens_neox': 567, 'n_words': 121}