Skip to content

Commit

Permalink
Extrend MandatoryParameterValidator to treat string expression with …
Browse files Browse the repository at this point in the history
…only quotes as empty value
  • Loading branch information
philemone committed Sep 30, 2024
1 parent d5a9006 commit 4889ded
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ const valueStartsWithQuotationMark = (value) => startsWith(value, '"') || starts
const quotationMark = (value) => (valueStartsWithQuotationMark(value) ? valueQuotationMark(value) : defaultQuotationMark);

export const stringSpelFormatter: Formatter = {
encode: (value) => {
if (value === "") return value;
else return quotationMark(value) + value + quotationMark(value);
},
encode: (value) => quotationMark(value) + value + quotationMark(value),
decode: (value) => value.substring(1, value.length - 1),
};

Expand Down

0 comments on commit 4889ded

Please sign in to comment.