All files / yaml utils.ts

100% Statements 10/10
66.66% Branches 2/3
100% Functions 3/3
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18    5x 12x   24x     5x 15x   15x 15x     15x    
import { YamlConfig } from "./config";
 
export const makePath = (path: string) => {
  return path
    .split(/(?<!\\):/g)
    .map((x) => (x.includes("\\:") ? x.replace("\\:", ":") : x));
};
 
export const getYamlStringifyOptions = (config: YamlConfig) => {
  const options: any = {};
 
  if (config.defaultStringType) {
    options.defaultStringType = config.defaultStringType;
  }
 
  return options;
};