Comparing version 3.0.9 to 3.0.10
@@ -6,4 +6,4 @@ import { type EscapeSequence } from './types/escape-sequence'; | ||
/** | ||
* Remove one layer of slashes, decoding any valid escape sequences into their | ||
* corresponding characters (eg. `\\n` will become a newline). | ||
* Remove one layer of slashes, decoding any Javascript escape sequences into | ||
* their corresponding characters (eg. `\\n` would become a newline). | ||
* | ||
@@ -10,0 +10,0 @@ * Use the `getUnescaped` option to customize escape sequence decoding. |
{ | ||
"name": "slashes", | ||
"description": "Add or remove backslashes (escape or unescape).", | ||
"version": "3.0.9", | ||
"version": "3.0.10", | ||
"license": "ISC", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -23,3 +23,3 @@ # Slashes | ||
By default, `addSlashes` will escape the following characters. | ||
By default, `addSlashes` will escape (encode) the following characters. | ||
@@ -71,3 +71,3 @@ - Backspace (`\b`) | ||
The `removeSlashes` function will _always_ remove one layer of slashes. | ||
Be default, `removeSlashes` will unescape (decode) all Javascript escape sequences. | ||
@@ -85,3 +85,3 @@ ```ts | ||
removeSlashes('\12'); // "\n" | ||
// The slash is removed if the escape sequence is invalid | ||
// Handles any other backslash sequence by removing the leading slash | ||
removeSlashes(`\\a`); // "a" | ||
@@ -92,3 +92,3 @@ ``` | ||
Although it should generally not be necessary because all escapes are automatically handled, escape decoding can be customized using the `getUnescaped` option. | ||
Although it should generally not be necessary because all escapes are handled by default, escape decoding can be customized using the `getUnescaped` option. | ||
@@ -95,0 +95,0 @@ The following is the default, equivalent to not setting the `getUnescaped` option. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29352