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 1.0.1 to 1.0.2

2

package.json
{
"name": "slashes",
"version": "1.0.1",
"version": "1.0.2",
"description": "Add or strip backslashes.",

@@ -5,0 +5,0 @@ "main": "slashes.js",

@@ -8,2 +8,9 @@ # slashes

The `add` method will prefix backslash (`\`), double quote (`"`), and single quote (`'`) characters with
backslashes. Null (`\0`) characters will be replaced with backslash zero `"\\0"`.
The `strip` method replaces all sequences of two characters that start with a backslash, with the second character in
the sequence. There are two caveats. A single non-escaped slash at the end of the string will be removed. Backslash
zero `"\\0"` will become a null (`\0`) character.
## Install

@@ -68,2 +75,2 @@

Note that in JavaScript, "\0" and "\u0000" are identical. The `add` method will convert both to "\\0".
Note that in JavaScript, "\0" and "\u0000" are identical. The `add` method will convert both to `"\\0"`.

@@ -23,3 +23,3 @@ "use strict";

--count;
str = str.replace(/\\(.)/g, strip_replace);
str = str.replace(/\\(.|$)/g, strip_replace);
}

@@ -26,0 +26,0 @@

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