• Returns a string that unquotes the given text

    Parameters

    • Optionaltext: null | string

      the text to inspect

    Returns string | undefined | null

    a string that unquotes the given text

    unquote(undefined);    // undefined
    unquote('\'foobar\''); // 'foobar'
    unquote('"foobar"'); // 'foobar'