• Returns a string that single quotes the given text

    Parameters

    • Optionaltext: null | string

      the text to inspect

    Returns string | undefined | null

    a string that single quotes the given text

    quoteSingle(undefined);    // undefined
    quoteSingle('foobar'); // '\'foobar\''