Skip to content

Commit

Permalink
Require Node.js 14
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Sep 27, 2022
1 parent b83ed2a commit 5c5d1d6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 23 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Expand Up @@ -10,11 +10,12 @@ jobs:
fail-fast: false
matrix:
node-version:
- 18
- 16
- 14
- 12
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Expand Up @@ -8,7 +8,7 @@ Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar`.
@example
```
import path from 'path';
import path from 'node:path';
import slash from 'slash';
const string = path.join('foo', 'bar');
Expand Down
9 changes: 5 additions & 4 deletions package.json
Expand Up @@ -12,8 +12,9 @@
},
"type": "module",
"exports": "./index.js",
"types": "./index.d.ts",
"engines": {
"node": ">=12"
"node": ">=14.16"
},
"scripts": {
"test": "xo && ava && tsd"
Expand All @@ -31,8 +32,8 @@
"convert"
],
"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"
}
}
18 changes: 3 additions & 15 deletions readme.md
Expand Up @@ -8,14 +8,14 @@ This was created since the `path` methods in Node.js outputs `\\` paths on Windo

## Install

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

## Usage

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

const string = path.join('foo', 'bar');
Expand All @@ -34,15 +34,3 @@ slash(string);
Type: `string`

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>

0 comments on commit 5c5d1d6

Please sign in to comment.