<commit_before><commit_msg>feat: add duck for registry :sparkles:<commit_after>// constant
const INITIALIZE_REGISTRY_KONNECTORS = 'INITIALIZE_REGISTRY_KONNECTORS'

// reducers

const initialState = { konnectors: [] }
const registry = (state = initialState, action) => {
  switch (action.type) {
    case INITIALIZE_REGISTRY_KONNECTORS:
      return {konnectors: action.konnectors}
    default:
      return state
  }
}

export default registry

// selectors

export const getRegistryKonnectors = state => state.registry.konnectors
export const getRegistryKonnector = (state, slug) => state.registry.konnectors.find(konnector => konnector.slug === slug)

// action creators sync

export const initializeRegistry = konnectors => ({type: INITIALIZE_REGISTRY_KONNECTORS, konnectors: konnectors})

{'fraction_non_alphanumeric': 0.09848484848484848, 'fraction_numerical': 0.0, 'mean_word_length': 5.1953125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '2105445', 'n_tokens_mistral': 267, 'n_tokens_neox': 255, 'n_words': 57}