<commit_before>var fs = require('fs')
var path = require('path')
var _ = require('lodash')
var useragent = require('useragent')
var Promise = require('bluebird')

exports.browserFullNameToShort = function (fullName) {
  var agent = useragent.parse(fullName)
  return agent.family !== 'Other' ? agent.toAgent() + ' (' + agent.os + ')' : fullName
}

exports.isDefined = function (value) {<commit_msg>fix(helper): Ensure browser detection is handled in the unkown case<commit_after>var fs = require('fs')
var path = require('path')
var _ = require('lodash')
var useragent = require('useragent')
var Promise = require('bluebird')

exports.browserFullNameToShort = function (fullName) {
  var agent = useragent.parse(fullName)
  var isKnown = agent.family !== 'Other' && agent.os.family !== 'Other'
  return isKnown ? agent.toAgent() + ' (' + agent.os + ')' : fullName
}

exports.isDefined = function (value) {
{'fraction_non_alphanumeric': 0.1558011049723757, 'fraction_numerical': 0.0, 'mean_word_length': 5.291666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '52721', 'n_tokens_mistral': 285, 'n_tokens_neox': 281, 'n_words': 72}