is-path-cwd
Advanced tools
Comparing version 2.2.0 to 3.0.0
@@ -6,3 +6,3 @@ /** | ||
``` | ||
import isPathCwd = require('is-path-cwd'); | ||
import isPathCwd from 'is-path-cwd'; | ||
@@ -16,4 +16,2 @@ isPathCwd(process.cwd()); | ||
*/ | ||
declare function isPathCwd(path: string): boolean; | ||
export = isPathCwd; | ||
export default function isPathCwd(path: string): boolean; |
@@ -1,5 +0,5 @@ | ||
'use strict'; | ||
const path = require('path'); | ||
import process from 'node:process'; | ||
import path from 'node:path'; | ||
module.exports = path_ => { | ||
export default function isPathCwd(path_) { | ||
let cwd = process.cwd(); | ||
@@ -15,2 +15,2 @@ | ||
return path_ === cwd; | ||
}; | ||
} |
{ | ||
"name": "is-path-cwd", | ||
"version": "2.2.0", | ||
"version": "3.0.0", | ||
"description": "Check if a path is the current working directory", | ||
"license": "MIT", | ||
"repository": "sindresorhus/is-path-cwd", | ||
"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": ">=6" | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
}, | ||
@@ -32,6 +35,6 @@ "scripts": { | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
"ava": "^3.15.0", | ||
"tsd": "^0.17.0", | ||
"xo": "^0.44.0" | ||
} | ||
} |
@@ -1,6 +0,5 @@ | ||
# is-path-cwd [![Build Status](https://travis-ci.org/sindresorhus/is-path-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-cwd) | ||
# is-path-cwd | ||
> Check if a path is the [current working directory](https://en.wikipedia.org/wiki/Working_directory) | ||
## Install | ||
@@ -12,7 +11,6 @@ | ||
## Usage | ||
```js | ||
const isPathCwd = require('is-path-cwd'); | ||
import isPathCwd from 'is-path-cwd'; | ||
@@ -26,5 +24,12 @@ isPathCwd(process.cwd()); | ||
--- | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) | ||
<div align="center"> | ||
<b> | ||
<a href="https://tidelift.com/subscription/pkg/npm-is-path-cwd?utm_source=npm-is-path-cwd&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
3162
34
Yes
23