<commit_before>'use babel'

import isGlob from 'is-glob'
import {isMatch} from 'micromatch'

export function getRules(relativePath, config) {
  const localConfig = {}

  for (const key in config) {
    const value  = config[key]

    if (value && value instanceof Array) {
      localConfig[key] = value.slice()
    } else if (typeof value === 'object') {
      localConfig[key] = Object.assign({}, value)
    } else {
      localConfig[key] = value
    }
  }<commit_msg>:bug: Fix handling of null in extend config<commit_after>'use babel'

import isGlob from 'is-glob'
import {isMatch} from 'micromatch'

export function getRules(relativePath, config) {
  const localConfig = {}

  for (const key in config) {
    const value  = config[key]

    if (value && value instanceof Array) {
      localConfig[key] = value.slice()
    } else if (value && typeof value === 'object') {
      localConfig[key] = Object.assign({}, value)
    } else {
      localConfig[key] = value
    }
  }
{'fraction_non_alphanumeric': 0.12844036697247707, 'fraction_numerical': 0.0, 'mean_word_length': 3.2695652173913046, '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': '4193870', 'n_tokens_mistral': 309, 'n_tokens_neox': 301, 'n_words': 92}