Comparing version 3.0.0 to 4.0.0
@@ -11,4 +11,4 @@ /** | ||
``` | ||
import * as path from 'path'; | ||
import slash = require('slash'); | ||
import path from 'path'; | ||
import slash from 'slash'; | ||
@@ -24,4 +24,2 @@ const string = path.join('foo', 'bar'); | ||
*/ | ||
declare function slash(path: string): string; | ||
export = slash; | ||
export default function slash(path: string): string; |
@@ -1,3 +0,2 @@ | ||
'use strict'; | ||
module.exports = path => { | ||
export default function slash(path) { | ||
const isExtendedLengthPath = /^\\\\\?\\/.test(path); | ||
@@ -11,2 +10,2 @@ const hasNonAscii = /[^\u0000-\u0080]+/.test(path); // eslint-disable-line no-control-regex | ||
return path.replace(/\\/g, '/'); | ||
}; | ||
} |
{ | ||
"name": "slash", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"description": "Convert Windows backslash paths to slash paths", | ||
"license": "MIT", | ||
"repository": "sindresorhus/slash", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
"url": "https://sindresorhus.com" | ||
}, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=12" | ||
}, | ||
@@ -31,6 +34,6 @@ "scripts": { | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
"ava": "^3.15.0", | ||
"tsd": "^0.14.0", | ||
"xo": "^0.38.2" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) | ||
# slash | ||
@@ -9,3 +9,2 @@ > Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` | ||
## Install | ||
@@ -17,8 +16,7 @@ | ||
## Usage | ||
```js | ||
const path = require('path'); | ||
const slash = require('slash'); | ||
import path from 'path'; | ||
import slash from 'slash'; | ||
@@ -34,3 +32,2 @@ const string = path.join('foo', 'bar'); | ||
## API | ||
@@ -44,5 +41,12 @@ | ||
--- | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) | ||
<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> |
Sorry, the diff of this file is not supported yet
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
3834
49
Yes
26