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

slash

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slash - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

2

index.d.ts

@@ -11,3 +11,3 @@ /**

```
import path from 'path';
import path from 'node:path';
import slash from 'slash';

@@ -14,0 +14,0 @@

export default function slash(path) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path);
const hasNonAscii = /[^\u0000-\u0080]+/.test(path); // eslint-disable-line no-control-regex
if (isExtendedLengthPath || hasNonAscii) {
if (isExtendedLengthPath) {
return path;

@@ -7,0 +6,0 @@ }

{
"name": "slash",
"version": "4.0.0",
"version": "5.0.0",
"description": "Convert Windows backslash paths to slash paths",

@@ -15,4 +15,5 @@ "license": "MIT",

"exports": "./index.js",
"types": "./index.d.ts",
"engines": {
"node": ">=12"
"node": ">=14.16"
},

@@ -35,6 +36,6 @@ "scripts": {

"devDependencies": {
"ava": "^3.15.0",
"tsd": "^0.14.0",
"xo": "^0.38.2"
"ava": "^4.3.3",
"tsd": "^0.24.1",
"xo": "^0.52.3"
}
}

@@ -5,3 +5,3 @@ # slash

[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters.
[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths.

@@ -12,5 +12,5 @@ This was created since the `path` methods in Node.js outputs `\\` paths on Windows.

```sh
npm install slash
```
$ npm install slash
```

@@ -20,3 +20,3 @@ ## Usage

```js
import path from 'path';
import path from 'node:path';
import slash from 'slash';

@@ -40,13 +40,1 @@

Accepts a Windows backslash path and returns a path with forward slashes.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-slash?utm_source=npm-slash&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
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