Socket
Socket
Sign inDemoInstall

is-path-cwd

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 2.0.0

license

6

index.js
'use strict';
var path = require('path');
const path = require('path');
module.exports = function (str) {
return path.resolve(str) === path.resolve(process.cwd());
};
module.exports = input => path.resolve(input) === process.cwd();
{
"name": "is-path-cwd",
"version": "1.0.0",
"description": "Check if a path is CWD",
"license": "MIT",
"repository": "sindresorhus/is-path-cwd",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"files": [
"index.js"
],
"keywords": [
"path",
"cwd",
"pwd",
"check",
"filepath",
"file",
"folder"
],
"devDependencies": {
"mocha": "*"
}
"name": "is-path-cwd",
"version": "2.0.0",
"description": "Check if a path is CWD",
"license": "MIT",
"repository": "sindresorhus/is-path-cwd",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"path",
"cwd",
"pwd",
"check",
"filepath",
"file",
"folder"
],
"devDependencies": {
"ava": "*",
"xo": "*"
}
}
# is-path-cwd [![Build Status](https://travis-ci.org/sindresorhus/is-path-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-cwd)
> Check if a path is [CWD](http://en.wikipedia.org/wiki/Working_directory)
> Check if a path is [CWD](https://en.wikipedia.org/wiki/Working_directory)

@@ -8,5 +8,5 @@

```sh
$ npm install --save is-path-cwd
```
$ npm install is-path-cwd
```

@@ -17,3 +17,3 @@

```js
var isPathCwd = require('is-path-cwd');
const isPathCwd = require('is-path-cwd');

@@ -30,2 +30,2 @@ isPathCwd(process.cwd());

MIT © [Sindre Sorhus](http://sindresorhus.com)
MIT © [Sindre Sorhus](https://sindresorhus.com)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc