All files / src/fn control-split.js

100% Statements 1/1
50% Branches 1/2
100% Functions 1/1
100% Lines 1/1
1 2 3 4 5 6 7 8 9        18x        
import {CONTROL_REGEX} from '@constants/regex-control'
import {hexCharCode} from '@fn/hex-char-code'
import {mapWrap} from '@fn/map-wrap'
 
export const controlSplit = (char) => (CONTROL_REGEX.test(char) ?
  mapWrap(hexCharCode, char) :
  char
)