Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

slashes

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slashes - npm Package Compare versions

Comparing version 3.0.9 to 3.0.10

4

lib/types/remove-slashes.d.ts

@@ -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.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc