diff --git a/src/index.ts b/src/index.ts index d488f82..e5d3cf5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -38,7 +38,7 @@ export function destr(value: any, options: Options = {}): T { if ( // eslint-disable-next-line unicorn/prefer-at value[0] === '"' && - value.at(-1) === '"' && + value.endsWith('"') && !value.includes("\\") ) { return _value.slice(1, -1) as T;