is-path-cwd
Advanced tools
Comparing version 1.0.0 to 2.0.0
'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) |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2197
4
2
3