This document provides a description of the full Application Programming Interface (API) of Shescape.
Please open an issue if you found a mistake or if you have a suggestion for how to improve the documentation.
The quote
function escapes and quotes a single argument and optionally takes
an options object. quote
always returns a string, the escaped and quoted
argument.
Non-string arguments are converted to strings; an error is thrown if this is not possible.
The quoteAll
function escapes and quotes an array of arguments and optionally
takes an options object. quoteAll
always returns an array of strings (same
length as the input array), the escaped and quoted arguments.
Non-array inputs are converted to single-value arrays. Non-string arguments are converted to strings; an error is thrown if this is not possible.
The escape
function escapes a single argument and optionally takes an options
object. escape
always returns a string, the escaped argument.
Non-string arguments are converted to strings; an error is thrown if this is not possible.
The escapeAll
function escapes an array of arguments and optionally takes an
options object. escapeAll
always returns an array of strings (same length as
the input array), the escaped arguments.
Non-array inputs are converted to single-value arrays. Non-string arguments are converted to strings; an error is thrown if this is not possible.
Content licensed under CC BY-SA 4.0; Code snippets under the MIT license.