All files index.ts

85.71% Statements 12/14
50% Branches 1/2
66.67% Functions 2/3
92.31% Lines 12/13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 331x 1x 1x 1x   1x           1x 1x   1x               1x       1x   1x   1x    
import { defaultTo } from 'rambdax'
import { getResult } from './modules/getResult'
import { getText } from './modules/getText'
import { getResultSamostoyatelen } from './samostoyatelen/getResult'
 
const methods: Methods = {
  SAMOSTOYATELEN: samostoyatelen,
  POZEMLEN: pozemlen,
}
 
function pozemlen(convertedText: string): string {
  const result = getResult(convertedText)
  const text = getText(result)
 
  return text
}
 
function samostoyatelen(convertedText: string): string {
 
  return getResultSamostoyatelen(convertedText)
}
 
export async function notary(
  textInput: string,
  modeRaw?: Mode,
): Promise<string> {
  const mode = defaultTo('POZEMLEN', modeRaw)
 
  Iif (textInput.length < 100) return ''
 
  return methods[mode](textInput)
}